Question: Write a program that generates a random number between 1 and 1 0 and asks the user to guess it . It then reads the
Write a program that generates a random number between and and asks the user to guess it It then reads the user's guess. If it's not the one generated, the program tells the user that the number is odd or even and that the guess was too low or too high. After the second try, the program tells again if it's too low or too high and that it's divisible by or not. After the rd try, if the user still hasn't got it the program tells what the number was. If anytime the user guesses it correctly, the program responds with "Right". Example: Guess the number generated between and : The number is even. Your guess is too low. Guess the number: The number is divisible by Your guess is too high. Guess the number: Right
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
