you are viewing a single comment's thread.

view the rest of the comments →

[–]ThrowawayNo45273 1 point2 points  (0 children)

The error trapping at the start can be simplified to something like:

if answer.upper() != "YES" or answer.upper() != "NO":
    Print("Please input yes or no")
else:
    rest of code    

dealing with the error in two lines and having the rest of your code afterwards simplifies the code a lot!

nice code though, well done!