Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2. Please use Python 3.0 code for this problem. Your assignment: In this assignment you will design a guessing game. Your program should generate
Question 2. Please use Python 3.0 code for this problem.
Your assignment: In this assignment you will design a guessing game. Your program should generate a random number in a certain range and give the user a predefined number of tries to guess the number. I'm expecting to see something similar to the following when I test your program: I'm thinking of a number between 1 and 100. Guess what it is. You have tries: 50 Nope! Too low. Try again (4 tries left): 75 Nope! Too high. Try again (3 tries left): 60 Nope! Too low. Try again (2 tries left): 70 Nope! Too high. Try again (1 try left): 65 Nope! You lost. The number was Do you want to play again? (Y/N): Y I'm thinking of a number between 1 and 100. Guess what it is. You have 5 tries: 50 Nope! Too low. Try again (4 tries left): 75 You got it! Hint: You will need nested loops in this lab. The outer loop will end when the user decides to stop playing. The inner loop williterate until the user runs out of tries or guesses the right numberStep 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