Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 17 Online
OpenStudy (anonymous):

I am using Python 3.2 and when I input an example that the professor uses from his first lecture video, I am getting a syntax error:invalid syntax. the example is: print 52*7. I notice for him it gives him a value but when I do it, it simply gives that error. any idea why? because of the different versions maybe? please help, thanks.

OpenStudy (anonymous):

Hey. The thing is he is using the older version of Python, 2.7.x, and as you mentioned, you are using 3.2. The thing with 3.x version is that it is not backwards compatible with 2.x, although most things are still the same. Print function is one of the functions which are changed, and in order to print you now have to put things into brackets, like this: print(52*7) or print('This is an example") I am also using the 3.2 to follow and have encountered the same issue at the beginning, but was able to solve it with a bit of Google help :)

OpenStudy (anonymous):

Feel free to ask questions here as well. I'd be happy to help with general python issues not necessarily just ones associated with the assignments...

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Breathless: Spooky witch but cute
4 hours ago 3 Replies 0 Medals
Arriyanalol: help
4 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 4 Medals
Jaded012023: Please tell me what you all think of this song
7 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
7 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!