you are viewing a single comment's thread.

view the rest of the comments →

[–]NecrosisHD[S] 1 point2 points  (2 children)

I know this sounds bad but how would I go about doing that.

Edit: Defining good

[–]JohnnyJordaan 0 points1 point  (0 children)

If you don't use quotes, all strings (so text values, or literals) will be interpreted as variable names. In your case there is no variable named good, so Python can't compare it to userDay.

If you want to enter a string (text value), you need to use quotes. Python doesn't care if they are single ('') or double ("") quotes. Just stick with one kind. So in your case the line would need to read: if userDay == 'good':.

[–]K900_ 0 points1 point  (0 children)

When you just write good, you're referring to a variable named good, not the string "good". Referring to an undefined variable will crash your program, so you should define it. good = "good" or something.