STEP 5: Time to code the expression that will check whether the year is evenly divisible by 4! This is Condition 1a.

Booleans are a data type with only two values: True or False. Boolean expressions always result in a Boolean.

  • From , drag Boolean Variable to the bottom of the program.
  • Change my_var to condition_1a and replace True with this Boolean expression: calc_1a == 0.

Remember that a single = assigns a value! Double == checks if values are equal and results in True or False.

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)