# pip install Py-Dictionary
from pydictionary import Dictionary
print("Welocme to the English Dictionary!")
print("""What you want to know?
A- Meanings
B- Synonyms
C- Antonyms""")
option = input("Plz enter your option: ").lower()
if option == "a":
word = input("Enter the word to know its meaning(s): ")
dict = Dictionary(word, 2)
dict.print_meanings("yellow") # yellow is for color of the printed text
elif option == "b":
word = input("Enter the word to know its synonym(s): ")
dict = Dictionary(word, 3)
dict.print_synonyms("blue")
elif option == "c":
word = input("Enter the word to know its antonym(s): ")
dict = Dictionary(word, 4)
dict.print_antonyms("green")
else:
print("Invalid input")
Comments
Post a Comment
Write something to CodeWithAbdur!