STEP 1: First we need to ask the user for a year to test whether it's a leap year or not.

The console can accept and store user input just like when you use .ask() on the stage!

  • Go to LOGIC and . Drag Input an Integer to the bottom of the program.
  • Change the input variable from my_var to year, and change the string to "Enter a year!"
  • Click Run and practice entering input using the console. Type your input and press Enter!

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)