Exercise 7.5#
Question 1#
Re-purpose your guess the number game from In Class Exercise 2 to give the user \(5\) guesses. Each time you ask the user to guess the number, print the message “Guess a number between 0 and 99 (5 attempts remain)”, where the number of attempts matches the actual number of attempts they have remaining.
Hint: You may want to make use of the
break
function.Now, make it so that the guess the number game continues indefinitely, until the user provides
'q'
as the input.