For the program below, if I enter "0" at the prompt, it provides the reply "Please, sit. It may be a while". However, if I just press the Enter key, it shuts the program down without a reply from the Maitre D'.
My question is this - the author of this exercise states the condition is False if either zero or "empty" is the value. I'm assuming he means that empty is just pressing Enter without entering a number? He talks about testing for empty values, but I'm not seeing that entering an empty value here yields the response he is talking about. Unless I'm mistaken about something. Thanks in advance for your assistance! #Maitre D' #Demonstrates treating a value as a condition print("Welcome to the Chateau D' Food") print("It seems we are quite full this evening.\n") money = int(input("How many dollars do you slip the Maitre D'?")) if money: print("Ah, I am reminded of a table. Right this way.") else: print("Please, sit. It may be a while.") input("\n\nPress the enter key to exit.")
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor