dictFrench = {
"je": "I",
"chat": "cat",
"chien": "dog",
"cheval": "horse",
"femme": "woman",
"fille": "girl",
"homme": "man",
"avec": "with",
"elle": "she",
"garcon": "boy",
"bonjour": "Good Morning!",
"salut": "hi"
}
print("\nWelcome to the cute little French-to-English Dictionary!")
print("\nThis dictionary contains the following French words.")
for word in dictFrench.keys():
print(word)
while True:
french_word = input("\nInput any French word to know its english meaning: ")
if french_word in dictFrench.keys():
print(f"\'{french_word}\' is French for \'{dictFrench[french_word]}\'.")
elif french_word == "":
print("Sorry! You have not entered any word.")
else:
print("Sorry this word is not in our dictionary.")
Comments
Post a Comment
Write something to CodeWithAbdur!