Lab 3

Lab Description:  I  was  assigned  to  complete  “Date  and  time”  from  codeacademy.  It  had  requested  that  I  write  a  code  that  involves  date  and  time.

Code:

from datetime import datetime
now = datetime.now()
m = str(now.month)
d = str(now.day)
y = str(now.year)
print m + "/" + d + "/" + y + " "
hh = str(now.hour)
mm = str(now.minute)
ss = str(now.second)
print hh + ":" + mm + ":" + ss

Screenshots:

Date and Time

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *