Learn
Good! Now let’s review the unless
statement.
problem = false print "Good to go!" unless problem
Remember, this is basically a short hand if
statement. It will do whatever you ask unless
the condition is true
. In our example, problem
is false
, so we don’t have a problem. We print Good to go!
Instructions
1.
Create an unless
statement in the editor. The statement should print something to the console.
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.