Grand Finale-help?


#1

`python
from datetime import datetime
now = datetime.now()

print '%s/%s/%s' % (now.month, now.day, now.year) '%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
Can anyone help out, I'm new to the program and a bunch of adult figures can't help? Thank you, if you know how to do this, and please help me out!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


#2

Cannot print both with one print statement unless you separate them with a comma. It will also insert a space character between them, if that's a problem.

# 3/10/2017 19:54:58

What you might need to do is combine everything into one expression.

print " %s ..." % (args)

The SCT is a little quirky that way.


#3

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