Question: write code in python. Main ( main . py ) 1 . open _ door ( door ) passes in a door object that the
write code in python.
Main mainpy
opendoordoor passes in a door object that the user will try to unlock. It should
display the description of the door, display the menu, then get the users selection. Then, pass the users input to the attempt method and display the result. Check the result of isunlocked, if the attempt was successful, then it should display the success message,
otherwise, it should display the clue message and repeat from the menu until the user
successfully opens the door.
main prompt the user for the level of difficulty and construct the specified factory.
Then create a loop that repeats three times for the three doors that the user will try to
open, use the factory to construct the door and then pass it to opendoor note: since its
randomly chosen, a particular door may appear more than once After the user
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
