You can do a lot of things with Python, one of them is validate the input of the user. Basically, you can compare the input from the user and the input you expect.

Here’s an example:

29

As you can see, at the end of the program it asks to the user if he/she want to try with another number or ends.

Nice, right?

CC BY 4.0 #Mastery29 by jsphsalazar is licensed under a Creative Commons Attribution 4.0 International License.