Lab 03 Date & Time
Lab Description:
Learn how to use strings and their syntax. This lab was fairly simple because of codeacademy. Just follow the instructions and there should not be too many problems.
Code:
from datetime import datetime
now = datetime.now()
year = now.year
month = now.month
day = now.day
hour = now.hour
minute = now.minute
second = now.second
print str(month) + “/” + str(day) + “/” + str(year ), str(hour) + “:” + str(minute) + “:” + str(second)