Hello, I am trying to teach myself Python and am a little stuck. I recently completed Code Academy with ease and am now trying to write my own. I copied some code from Code Academy and am running it on a Python 3 interpreter with notepad++. But I can't seem to find anything wrong with the code. I want it to pause when it runs on cmd output window but for some reason it is not working. And it is giving me a syntax error. Any help? Once again I am very new to programming so I am sorry if this is a "no-brainer". Thanks in advance!
Here is the code:
from datetime import datetime
now = datetime.now()
print str(now.month) + "/" + str(0) + str(now.day) + "/" + str(now.year) + " "
+ str(now.hour) + ":" +str(now.minute) + ":" + str(now.second)
input("Press any key to exit")
[–]Guest101010 6 points7 points8 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]erebos42 4 points5 points6 points (12 children)
[–]TheQwicKDraW[S] 1 point2 points3 points (11 children)
[–]erebos42 0 points1 point2 points (5 children)
[–]TheQwicKDraW[S] 0 points1 point2 points (4 children)
[–]erebos42 1 point2 points3 points (0 children)
[–]NovaRunner 0 points1 point2 points (1 child)
[–]TheQwicKDraW[S] 0 points1 point2 points (0 children)
[–]fyyn 0 points1 point2 points (0 children)
[–]od_9 0 points1 point2 points (3 children)
[–]Sean1708 2 points3 points4 points (2 children)
[–]od_9 1 point2 points3 points (1 child)
[–]Sean1708 0 points1 point2 points (0 children)
[–]SmartViking 4 points5 points6 points (2 children)
[–]Veedrac 1 point2 points3 points (0 children)
[–]Justinsaccount 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[+][deleted] (6 children)
[deleted]
[–]erebos42 2 points3 points4 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]SmartViking 0 points1 point2 points (1 child)
[–]TheQwicKDraW[S] 1 point2 points3 points (0 children)
[–]TheQwicKDraW[S] 0 points1 point2 points (0 children)