Syntax errors


#1

So i'm not having trouble with the site atm but i am starting to do the code in the python IDE to use it more and i'm noticing the syntax in the site doesn't work in the IDE

So can anyone good at programming explain to me why i'm getting an error with the print statement in the for loop when using an IDE???


for letter in "code academy":
   print letter


#2

Probably more Python version dependent than IDE dependent. With Python 2.x your code would work fine. With Python 3 however you need brackets around print. If you'd run your code on your IDE with Python 2.x, it probably would work as well.


#3

I thought the course said it was for python 3?


#4

no - the exercises and tutorials are Python 2!


#5

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