STEP 3: Now let's start using the datetime module that we imported! Whenever you see datetime or dt in the code, you are using the module. It allows Python programs to access the exact date and time on your computer.

  • In SUBJECT, go to and drag Current Datetime into the bottom of the main function.
  • Change current_datetime to my_datetime, including inside the print statement.
  • Click Run then click on the Console button to see what information is printed out!

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)