Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is the code of part 3A that's mentioned to be imported def Guess_Win(): print('Try to guess a number between 1 and 10') guess =
This is the code of part 3A that's mentioned to be imported
def Guess_Win(): print('Try to guess a number between 1 and 10') guess = input('What''s your first guess? ') from random import randint num = randint(1, 10) while(guess != num): if guess
Guess_Win()
Write a Python script (that is the user interface) which first display a menu to the user and allows user to play the game or quit from the program according to the user response. After each round of the game, this menu to play again, or quit. must be displayed again and the user can choose whether Guess Win Allows user to guess a random number between 1 and 10. A sample interaction when the script is run must look like follows. D Play the guessing gane Quit Enter your choice:p try to guess a number between i and 10 What's your first guess?5 Too lo What's your next guess79 Too high What's your next guess?6 That's it #MENU## Pl Play the guessing gane Quit Enter your cheice P Try to guess a number between i and 10 What's your first guasa75 Too low What's your next guess79 That's it pl play the guessing game Quit Enter your choice:q Bye!! Save your script as "PA2 Question3B.py" Note: Import Guess Win () function from PA2-Ouestion3A.py Steps of user interface can be given as follows: 1. Display the menu 2. Get user choice 3. while user choice is not equals to q" do, a. Allow use to play the game by calling the GuesssWin function b. Display the men c. Get user choice 4. Display nessage Bye!!! * You can write a separate function to display the menu. (optional)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started