ELSE: if and elif help if the condition is met (True), but else helps whenever the condition is not met (False)!

  • Check out the code and click Run a few times. Try wishing for whatever you want!
  • Change the final elif statement to be an else statement instead.
  • Remember, else statements don't include a condition at all! They look like this: else:
  • else statements can help handle all possible conditions that weren't caught by an if or elif.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)