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 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
Get step-by-step solutions from verified subject matter experts
