Make your own dictionary using python

Hey guys once again welcome to the decoders blog I hope you all are doing well and today I'm present with a simple dictionary which you can create using python the given code will help you to built it so just follow the codes and make your own dictionary 

#making a dictionary using python
#my vocabulary : sword='kind of weapon used for fighting' human beings='living
organisms'
print("welcome to the dictionary")
word=input("enter your word")
dict1=["sword","human beings"]
dict2=["kind of weapon used for fighting","living organisms"]
if word=="sword":
print(dict2[0])
elif word=="human beings":
print(dict2[1])
print("searching for more meanings")
yes_no =input("yes/no")
if yes_no=="yes":
print("ok")
elif yes_no=="no":
print("see you again byee")
else:
print("invalid input")


 

 

Comments

Popular Posts