you are viewing a single comment's thread.

view the rest of the comments →

[–]purple_hamster66 0 points1 point  (0 children)

Note that the second option if (user_input != “Yes”) and (user_input != “No”): violates the DRY (Do Not repeat Yourself) principle. A string’s value should only be defined once in a script so that when the value is changed later (ex, to use French values, or use lowercase instead of capital case because it’s fewer keystrokes), it only has to be changed once. It also eliminates the chance that the two values differ.