Im doing the right format correct but it says im not


#1



https://www.codecademy.com/courses/python-beginner-en-zFPOx/0/6?curriculum_id=4f89dab3d788890003000096#


I know im doing it right but it says Oops, try again. Your printed date and time do not seem to be in the right format: mm/dd/yyyy hh:mm:ss


i think it should say you have finished the course


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

Actually, the instruction says, print the date and time together.
So instead of printing them separately like what youve done, print them together.
Like this:

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

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.