Code working but still shows error 4/6


from datetime import datetime
now =
print '%s/%s/%s' % (now.month,, 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



Hi remove the second print and all should be print on online like that mm/dd/yyyy hh:mm:ss. so your print should be like that print '%s/%s/%s %s:%s:%s' (......)


it still shows the same error


But the code iin the first post work fine


its working now..... ty


@wizmarco Yes, that outputs the desired result you’re looking for in the exercise and runs correctly. But they are also trying to teach you how to print variables that are integers by using the pad function.

from datetime import datetime
now =
print "%02d/%02d/%04d" % (now.month,, now.year)

I personally messed this exercise up myself trying to give each separate part of the date a variable.
But i think importing the folder datetime allows you the respected arguments without having to do so.