STEP 9: Time to evaluate the other option: whether the year is evenly divisible by 400. This is our Condition 2.

  • From , add in Remainder. Change my_var to calc_2 and the equation to year % 400
  • From , drag in Boolean Variable.
  • Change the variable name to condition_2 and set it equal to this Boolean expression: calc_2 == 0
  • From , use Output Variable and edit it to output condition_2 with a label. Click Run!

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)