Question: In Python Now that we have our dictionary, we must be able to determine whether a guess is in fact valid. Remember, a guess is

In Python
Now that we have our dictionary, we must be able to determine whether a guess is in
fact valid. Remember, a guess is valid only if it is a five letter word that appears in the
dictionary.
Write a program that takes as input the dictionary (as in the previous task), followed
by a guess, and outputs whether it is valid or not.
Input
The first part of input is the dictionary, given in the same format as the previous task.
The end of the dictionary is indicated by the string ### which should not be included
in the dictionary. Afterwards, the final line of input is a single guess (guaranteed to be
in uppercase). Note that this guess may be a word of any length, but the dictionary
contains only five letter words.
Output
Output Valid if the word is a valid guess. Otherwise, print Invalid.
Example Input-Output Pairs
In Python Now that we have our dictionary, we

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 Programming Questions!