Question: Python Problem 4 Implement the GuessNumber game. In this game, the computer Think of a random number in the range 0-50. (Hint: use the random

Python Problem 4

Implement the GuessNumber game. In this game, the computer

  • Think of a random number in the range 0-50. (Hint: use the random module.)
  • Repeatedly prompt the user to guess the mystery number.
  • If the guess is correct, congratulate the user for winning. If the guess is incorrect, let the user know if the guess is too high or too low.
  • After 5 incorrect guesses, tell the user the right answer.

The following is an example of correct input and output.

I'm thinking of a number in the range 0-50. You have five tries to guess it. Guess 1? 32 32 is too high Guess 2? 18 18 is too low Guess 3? 24 You are right! I was thinking of 24!

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