Времена глаголов — Python

Моя цель — сделать несколько таблиц с латинским, а затем английским переводом.
На данный момент у меня есть такой код:

firstconjugationtenses = {'present': ['am-o', 'ama-s', 'ama-t', 'ama-mus', 'ama-tis', 'ama-nt'], 'imperfect': ['ama-bam', 'ama-bas', 'ama-bat', 'ama-bamus', 'ama-batis', 'ama-bant'], 'future': ['ama-bo', 'ama-bis', 'ama-bit', 'ama-bimus', 'ama-bitis', 'ama-bunt'], 'perfect': ['amav-i', 'amav-isti', 'ama-vit', 'ama-vimus', 'ama-vistis', 'ama-verunt']}
firstconjugationverbs = {"am-o": "love"}

firstprincipalpart = firstconjugationtenses['present'][0]
englishverb = firstconjugationverbs[firstprincipalpart]
firstprincipalpart = firstprincipalpart.replace("-", "")
print(firstprincipalpart + " - I " + englishverb)
for tense in firstconjugationtenses.keys():
  print("33[1m" + tense.title() + "33[0m")
  persons = firstconjugationtenses[tense]
  for person in persons:
    if tense == "present":
      if persons.index(person) == 0:
        print(f"{person}: I {englishverb}")
      elif persons.index(person) == 1:
        print(f"{person}: You {englishverb} (sg.)")
      elif persons.index(person) == 2:
        print(f"{person}: He/she/it {englishverb}s")
      elif persons.index(person) == 3:
        print(f"{person}: We {englishverb}")
      elif persons.index(person) == 4:
        print(f"{person}: You {englishverb} (pl.)")
      elif persons.index(person) == 5:
        print(f"{person}: They {englishverb}")
    elif tense == "future":
      if persons.index(person) == 0:
        print(f"{person}: I shall {englishverb}")
      elif persons.index(person) == 1:
        print(f"{person}: You will {englishverb} (sg.)")
      elif persons.index(person) == 2:
        print(f"{person}: He/she/it will {englishverb}")
      elif persons.index(person) == 3:
        print(f"{person}: We will {englishverb}")
      elif persons.index(person) == 4:
        print(f"{person}: You will {englishverb} (pl.)")
      elif persons.index(person) == 5:
        print(f"{person}: They will {englishverb}")
    elif tense == "perfect":
      if persons.index(person) == 0:
        print(f"{person}: I used to {englishverb}")
      elif persons.index(person) == 1:
        print(f"{person}: You used to {englishverb} (sg.)")
      elif persons.index(person) == 2:
        print(f"{person}: He/she/it used to {englishverb}")
      elif persons.index(person) == 3:
        print(f"{person}: We used to {englishverb}")
      elif persons.index(person) == 4:
        print(f"{person}: You used to {englishverb} (pl.)")
      elif persons.index(person) == 5:
        print(f"{person}: They used to {englishverb}")
    elif tense == "imperfect":
      if persons.index(person) == 0:
        print(f"{person}: I have {englishverb}d")
      elif persons.index(person) == 1:
        print(f"{person}: You have {englishverb}d (sg.)")
      elif persons.index(person) == 2:
        print(f"{person}: He/she/it has {englishverb}d")
      elif persons.index(person) == 3:
        print(f"{person}: We have {englishverb}d")
      elif persons.index(person) == 4:
        print(f"{person}: You have {englishverb}d (pl.)")
      elif persons.index(person) == 5:
        print(f"{person}: They have {englishverb}d")
Войти в полноэкранный режим Выйти из полноэкранного режима

Этот код выводит:

amo - I love
Present
am-o: I love
ama-s: You love (sg.)
ama-t: He/she/it loves
ama-mus: We love
ama-tis: You love (pl.)
ama-nt: They love
Imperfect
ama-bam: I have loved
ama-bas: You have loved (sg.)
ama-bat: He/she/it has loved
ama-bamus: We have loved
ama-batis: You have loved (pl.)
ama-bant: They have loved
Future
ama-bo: I shall love
ama-bis: You will love (sg.)
ama-bit: He/she/it will love
ama-bimus: We will love
ama-bitis: You will love (pl.)
ama-bunt: They will love
Perfect
amav-i: I used to love
amav-isti: You used to love (sg.)
ama-vit: He/she/it used to love
ama-vimus: We used to love
ama-vistis: You used to love (pl.)
ama-verunt: They used to love
Войти в полноэкранный режим Выйти из полноэкранного режима

Я прекрасно понимаю, что окончания прошедшего времени некоторых глаголов неправильные, поэтому есть ли способ получить глаголы в разных окончаниях, которые соответствуют лицу и времени, очень простым способом?

Оцените статью
Procodings.ru
Добавить комментарий