LogFAQs > #956092631

LurkerFAQs, Active DB, DB1, DB2, DB3, DB4, DB5, DB6, DB7, Database 8 ( 02.18.2021-09-28-2021 ), DB9, DB10, DB11, DB12, Clear
Topic List
Page List: 1
TopicITT: 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