Topic List | Page List: 1 |
---|---|
Topic | ITT: Learning Python |
1337toothbrush 07/14/21 10:44:29 PM #79: | In what way do you want it to work? I have a couple of simple modifications, shown in the image below: First off, when you get the input from the user, set it to a singular letter case (upper or lower) so that you can make comparisons more easily (without the modification on line 13 above, a user typing "Yes" would have the program exit). Second, you had this after the while loop: if roll_again != "yes" or "y": However, that is redundant since the while loop already checks that at the beginning of the loop every time. When it exits the loop, this condition will always be true. Here is the link to the code snippet with modifications: https://www.ideone.com/agvENu --- ... Copied to Clipboard! |
Topic List | Page List: 1 |