Lab Description: The goal in this lab is to simply log into www.codeacademy.com and complete the “Date and Time” tutorial. Once you complete the tutorial, proceed to Python 2.7 or Python 3.3 and run the code of the final lesson of the Date and Time tutorial. The following Python code prints the date and time in the form: mm/dd/yyyy hh:mm:ss.
Code:
from datetime import datetime
now = datetime.now()
print ‘%s/%s/%s %s:%s:%s’ % (now.month, now.day, now.year, now.hour, now.minute, now.second,)
Screenshots: