Make sure the file GuessNumber. Py is selected and open. Write loops that validate input at all places in the code where the user is asked to provide input. Comments have been included in the code to help you identify where these loops should be written. Execute the program. See if you can guess the randomly generated number. Execute the program several times to see if the random number changes. Also, test the program to verify that incorrect input is handled correctly. On your best attempt, how many guesses did you have to take to guess the correct number

Respuesta :

To check the input, use an if/else or a try/except statement. Use a continue statement to move on to the next iteration if the input is invalid. Use a break statement to exit the loop if the input is correct.

The flag variable will initially be set to false and if we can determine that the input data is what we are expecting, the flag status can be set to true and we can determine what can be done next based on that. The validation can be done in two different ways, namely by using a flag variable or by using try or except. For specific data types, validation should strive to be as tolerant of various forms of input as possible.

Learn more about variable here-

https://brainly.com/question/13084948

#SPJ4