Pretty time help


it keeps giving me an error for this, it should be right, right?

from datetime import datetime
now =

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


This is what the instructions say for this exercise.

02) Change the three things that you are printing from month, day, and year to now.hour, now.minute, and now.second.

Try it again and you should be good to go.


I think you are missing a space, and have added an extra semicolon.
For example try: print '%s/%s/%s %s:%s:%s' %


You have put >>> : after first three %s.

It should be--

'%s/%s/%s %s:%s:%s'


that didnt work. it still said "Oops, try again. It looks like your printed time is not in the proper format: hh:mm:ss"


omg I spent a good hour on this. than when you did it. it look easy.


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

I hope it helps! There is space between the them.


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