Pretty time help


#1



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

from datetime import datetime
now = datetime.now()

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


#3

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.


#4

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


#5

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

It should be--

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


#6

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


#7

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


#8

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

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


#9

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