Question: Reflect on Exercise 1 In this exercise, you created a while - loop that repeats so long as the user gives invalid input. So if
Reflect on Exercise
In this exercise, you created a whileloop that repeats so long as the user gives invalid input. So if you have a particularly stubborn user, the program will run forever. Sometimes that is not what you want. If the user is being particularly problematic, you may just want to shut down after a certain number of tries. But you want to do that without penalizing users who get it right on the first try.
How could you modify your whileloop to limit the number of tries?
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
