Question: Write a simple guessing program that generates a random number between 1 and 7 and asks the user to guess the number. If the user
Write a simple guessing program that generates a random number between
and and asks the user to guess the number. If the user guesses input value match
the programs random number. It prints Congratulations You won else prints Sorry
Try again Use a loop so that the user gets to play the game repeatedly. The program
terminates on entering any key by the user, except on Y or y key.
Example If the programs random number is and the users guess number is
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
