WARNING: This program has a logic error, so we have to debug it.

RULE: if statements are always checked. elif are only checked when the preceding if or elif is False.

  • Click Run and look at the output on the stage. Notice how the sprite says that it is different times of day?
  • Fix the program so the sprite says "Night!" by changing all the if statements except the first one to elif.
  • Click Run to test if you fixed the program. When it is fixed, click Submit and Next.

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)