Tuesday, June 10, 2014

Day 66

Explored Python at CodeCademy. Worked on Python tutorial 4 of 6, Date and Time, Hot Date. Learned how to print date in a specific format.

The code used:
from datetime import datetime
now = datetime.now()
print '%s/%s/%s' % (now.month, now.day, now.year)

The interaction looked like this:
6/11/2014

No comments:

Post a Comment