first project Code for dictionary small 20/8/21

dict1 = {“knife” : “a sharp cutting tool”, “TV” : “Television”, “legs”: “body part”, “rain”:”water form the clouds”}
pick1 = input(“pick a word:”)

print(dict1[pick1])

#Here first i created a dictionary and #then named dict1 plus i named pick1 #the input function

#In the last i printed from the dictionary dict1 it searched pick1 (key ) and gave his value

Leave a Comment