Date And Time

#1 The date time library
date-1
instructions:
Click Save & Submit Code to continue.

#2 Getting the Current Date And Time
date-2
instructions:

  1. Create a variable called now and store the result of datetime.now() in it.
  2. Then, print the value of now.

#3 Extracting information
date-3
Instructions :

  1. On a new line, print now.year. Make sure you do it after setting the now variable!
  2. Then, print out now.month.
  3. Finally, print out now.day

#4 Hot Date
date-4
Instructions:

Print the current date in the form ofmm/dd/yyyy.

  1. Change the string so that it uses a /character in between the %s placeholders instead of a - character.
  2. Re-arrange the parameters to the right of the % operator so that you print now.month, then now.day, then now.year.

#5 Pretty Time
date-5
Instructions:

Similar to the last exercise, print the current time in the pretty form of hh:mm:ss.

  1. Change the string that you are printing so that you have a : character in between the %s placeholders.
  2. Change the three things that you are printing from month, day, and year tonow.hour, now.minute, and now.second.

    #6 Grand Finale
    date-6
    instructions :
    Print the date and time together in the form:mm/dd/yyyy hh:mm:ss.

    To start, change the format string to the left of the % operator.

    1. Ensure that it has 6 %s placeholders.
    2. Put slashes and colons and a space between the placeholders so that they fit the format above.

      Then, change the variables in the parentheses to the right of the % operator.

    3. Place the variables so that now.month, now.day, now.year are before now.hour, now.minute, now.second. Make sure that there is a ( before the six and a ) after them.

EXPERIENCE :
in this assignment I was actually feeling very comfortable since it was not as hard as the previous ones. I felt like we just had substitute some things for the others for examples commas or slash or colon sign. it was time taking at first but going through hints I was able to complete the assignment pretty quickly.