Question: Please update the provided pseudocode by re-writing it into Python code, such that the guessing game allows a player at most 10 attempts to guess

 Please update the provided pseudocode by re-writing it into Python code,

Please update the provided pseudocode by re-writing it into Python code, such that the guessing game allows a player at most 10 attempts to guess a random integer between O and 100 (inclusive). After each guess the program will say whether the answer is too low, too high, or correct, and after 10 guesses or one correct guess the game will end. At the end of the game the program will say the player has won or lost. secret-number = generate a random number between guess = -1 while secret-number != guess and 100 guess = get a guess input from player if guess secret_number say "your guess is low" else if guess secret_number say "your guess is high" else say "you guessed right! end if end while

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!