Problem in codecademy syntax


#1

I am learning from codecademy but i also make my own programs in a different compiler to practice what i have learned. I have found that many tactics that we use here give error there. For ex, “()” these parentheses are not used with print statement here but if i don’t use them in there the program gives error. Can anybody explain this.


#2

codecademy uses python 2. In python 3 you need to add parentheses around the value to be printed but in python 2 parentheses are not necessary.


#3

ah, but then why haven’t codecademy updated it to py3, isn’t it best to teach the latest one, or is there no major difference in py2 and py3


#4

Well for starters, python isn’t exactly backwards-compatible.
Little changes can break everything, so it’s not as simple as running the update and voila.
It’d take a complete course overhaul, which takes time and money, and they’ve had to work on other projects.

Besides, Python 2 is battled-tested, and there are advantages to using it.

You can find out more here: https://wiki.python.org/moin/Python2orPython3


#5

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