Hot Date Lesson Outputs SyntaxError


#1

For some reason the examples in codeacademy do not work in actual Python. The example that passes in codeacademy produces a SyntaxError in both IDLE and the command line (see screenshot below.) This was the case for the whitespace lesson earlier in the course. Can someone explain why this produces an error or what I'm doing wrong? I'm not going to waste any more time trying to learn Python on a site that regularly gives bad information.


#2

In Python 3 print is now a function.

>>> print ('%s/%s/%s' % (now.month, now.day, now.year))
3/4/2017
>>>

It's not bad information, just an older version Python... 2.7.x


#3

Thank you for explaining this, I was banging my head against a wall and, in frustration, came off as a complete asshole. I am genuinely grateful to people like you in the Python community that are willing to help beginners like me.


#4

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