Don't see whats wrong here


#1

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)

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


#3

the output should be on a single line, so just 1 print statement


#4

when I hit submit this is what appears

4/26/2017
21:11:59
None


#6

I tried that and this appears

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)

Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: invalid syntax (python, line 4)


#7

you still have two print keywords?


#8

I don't think there should be two prints on the same line. Clicking the 'hint' button won't hurt, It may help you pass this.


#9

so print time and day?


#10

when I do it the way I originally pasted this is what prints

4/26/2017
21:19:53
None


#11

a single print statement which output the the current date and time in this format:

mm/dd/yyyy hh:mm:ss

you have:

4/26/2017
21:19:53

it should be:

4/26/2017 21:19:53

#12

The instructions say to do so. Just follow the instructions. :slight_smile:


#13

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