STEP 14: What if the user doesn't enter farm or city? The if-statement and the elif-statement will both be False.

We can code an option for if both previous tests were False by using an else-statement!

  • Click LOGIC, then . Drag out Else and drop it not indented at the bottom of your program.
  • Click GRAPHICS, then , drag out Winter and drop it indented UNDER the else-statement.

  • Click Run and type anything except farm or city into the second ask bubble to check your work!

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)