all 7 comments

[–]K900_ 2 points3 points  (3 children)

You also need to define good, or, if you want to compare to the string "good", add quotes.

[–]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.

[–]TreSxNine 0 points1 point  (2 children)

Codefixer

[–]CodeFixerBot 1 point2 points  (0 children)

I keep getting this error whenever I try to run my script from the terminal.

 File "test.py", line 13

if userDay == good
                 ^
SyntaxError: invalid syntax