Variable Error: ! PLEASE HELP!

I have a variable called “ship”. Only the first “if” statement works and changes the variable “ship”. Everything else will cause a name error. Can anyone help?

Repl link:
https://replit.com/@Bradford-Tang-K/Love-Calculator-love-v18-or-BETA?v=1

code snippet

Take a look at the if block that starts on line 30.
Notice that if the condition on line 32 fails, then ship never gets set. So, you may want to add an else clause to the nested if statement that begins on line 32.

3 Likes

Thank You, It Worked!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.