Lab 3: Date and Time

Lab Description:

The purpose of this lab was to us get a better understanding of strings and functions. My experience with this lab is that I had a better understanding about string formatting and string methods.

 

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)

Screenshot:

Alex  emt 1111

Leave a Reply

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