Question: Code and design the following program requirements: This program is a guessing game program. The program will generate a random integer between 1 and 1
Code and design the following program requirements:
This program is a "guessing game" program. The program will generate a random integer between and inclusive. The program should prompt the user to enter a guess. For each guess, the program will output HIGHER if the user's guess is lower than the target, LOWER if the user's guess is higher than the target, or WINNER if the user guesses the target. Each time the program prompts the user for a new guess, it should calculate and display the eligible range of values.
Sample output:
Please enter a number between and :
Your guess is too high, try again.
Please enter a number between and :
Your guess is too high, try again.
Please enter a number between and :
Your guess is too low, try again.
Please enter a number between and :
Your guess is too high, try again.
Please enter a number between and :
Your guess is too low, try again.
Note: Ensure that the prompt displays the current range of valid numbers.
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
