在Python中创建一个从拉脱维亚语到英语的原语翻译器[已关闭]

xxb16uws  于 2023-01-29  发布在  Python
关注(0)|答案(1)|浏览(129)

已关闭。此问题需要details or clarity。当前不接受答案。
**想要改进此问题?**添加详细信息并通过editing this post阐明问题。

昨天关门了。
Improve this question
是这样吗?

class UniversalWeek:
lv = ["Pirmdien", "Otrdien", "Trešdien", "Ceturdien", "Piektdien", "Sestdien", "Svetdien"]
en = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Šaturday", "Sunday"]

我不知道如何完成代码

m1m5dgzv

m1m5dgzv1#

class UniversalWeek:
lv = ["Pirmdien", "Otrdien", "Trešdien", "Ceturdien", "Piektdien", "Sestdien", "Svetdien"]
en = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Šaturday", "Sunday"]
d=""
def GetDay(self):
self.d =input ("Dienas nosaukumu: ")
if self.d not in self.lv:
  print("Kļūda")
else:
  i = self.lv. index (self.d)
  print(self.en[i])

相关问题