What did i do wrong?


#1

Oops, try again. Your printed date and time do not seem to be in the right format: mm/dd/yyyy hh:mm:ss


from datetime import datetime
now = datetime.now()
print '%s/%s/%s' % (now.month, now.day, now.year)
print '%s:%s:%s' % (now.hour, now.minute, now.second)


#2

Take care of what it's asking you:

Print the date and time together in the form: mm/dd/yyyy hh:mm:ss.

It's asking you to print them all on the same line. So while your code is technically correct, you need to rearrange some things so that it's all in one single print statement :slightly_smiling:


#3

try assign your code like this

from datetime import datetime
now = datetime.now()
day = '%s/%s/%s' % (now.month, now.day, now.year)
time = '%s:%s:%s' % (now.hour, now.minute, now.second)
print(day, time)

hope this works