Question: In PYTHON Write a program that does the following: create a dictionary called antonyms that holds ('up': 'down', 'in': 'out', 'above': 'below'} accept a word

In PYTHON Write a program that does the following: create a dictionaryIn PYTHON

Write a program that does the following: create a dictionary called antonyms that holds ('up': 'down', 'in': 'out', 'above': 'below'} accept a word as input from the user if the word is a key in the dictionary, print 'antonym: _', where the blank is filled in with the value looked up from the dictionary. if the input is not a key in the dictionary, print'__ is not in the dictionary', where the blank is replaced with the user's word. Expected output if the input is 'up': antonym: down Expected output if the input is 'down': 'down is not in the dictionary

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!