STEP 6: Introducing the newest data type: Booleans! Let's output our first Boolean, condition_1a, to see its value.

Boolean expressions create True or False results. The data type of True or False is Boolean, or bool for short.

  • From , drag Output Variable onto the next line.
  • Set it up like this to output the value of condition_1a: print("condition_1a is", condition_1a)
  • Click Run and enter a year. What do you see as the output in the console?

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)