############################################################ # # Ask the Question. # Get the answer. # Make response Upper Case # If Yes ..... rejoice! # If No ..... weep! # Otherwise ..... Error!!!!! # # Data Structures # =============== # # Many ways to say Yes ... Maybe a tuple of all? # To test response against # All elements Upper Case # Many ways to say No ... Maybe a tuple of all? # To test response against # All elements Upper Case ############################################################ Yes = ('Y', 'YES', 'OK') # All allowed Yes answers No = ('N', 'NO', 'NEVER' ) # All allowed No answers Response = input("Do you understand Loops yet??? ").upper() if Response in Yes: print("Jolly Good!") elif Response in No: print("Well, Try harder!") else: print("Answer must be Yes or No!")