What version of Python does Codecademy use? What I'm learning here doesn't seem to work elsewhere

I wasn’t sure if this was the right place to post this, but it has been a big problem for me.

My main problem with this course is it doesn’t offer enough opportunities for practice. It gives me the equivalent of lectures and a little bit of homework, but I need a lot more practice if I’m going to retain what I’m trying to learn. I Googled “python practice” and “python homework” and got a boatload of practice options. However, when I try to do these little challenges, I get a parade of roadblock errors (syntax errors, mostly). Every line seems to have something wrong with it.

I’m doing this at repl.it, which seems to use a different version of Python. I tried “Python 3” and it didn’t work, so I’ve been using the one just called “Python”… which also doesn’t work. I found one called Python 2.7 and I thought that must be it, but it isn’t.

I learned what Codecademy calls raw_input() is just called input() at repl.it. The print "String text" syntax doesn’t work over there, I have to use print("String text"). These are the only two specific ones I’ve tracked down, but I’m currently struggling to write a program that tells the user whether an integer is odd or even. It’s the world’s simplest program, but I’m like a toddler slapping the keyboard, trying to write it.

Is this a repl.it problem or an Codecademy one? Is there somewhere else I can practice Python that jibes better with what I’m learning here? If I ever want to use Python am I going to have to take another class to clear out the syntax problems I picked up at Codecademy?

1 Like

python made breaking change to move forward (python3).

codecademy’s is still python2, but it does include hints about python3. But i haven’t taken the course in a while, so i have to investigate it.

the python3 course is work in progress

actually learning both versions of python2 would be good, its interesting to see why python made breaking changes.

there are also comprehensive guides about the major differences, you already found two of the major changes:

raw_input() -> input()
input() -> eval(input())
print -> print()

how enumerate, zip, reversed, range and filter work for example also change

i know, as a new learner, this is not what you are waiting for, but its the way to move forward, to learn about this will improve your understanding

you are more then welcome to ask python3 related questions here on the forum. (as long as it doesn’t involve larger projects)

1 Like

Thank you! That’s really helpful. I wasn’t sure you’d actually be able to answer a question that involves a platform outside of Codecademy, so I really appreciate the guidance (as always).

it depends on the question, i mean if you just dump a thousand lines of code and just say: please help me, you are very likely not going to receive much help

but if you have a smaller question, and post: this is what i want to do/try to achieve, this is my code, this is what i think is going wrong, i think it might be caused by … (fill in the blanks). Maybe you do not have the answers to all these questions yet, but if you do your best, very likely going to receive some help

questions unrelated to codecademy should generally be asked in the corner bar

1 Like

Our free Python course is in Python 2, whereas our Python course in our Pro Paths or in our Pro Intensives, like Programming with Python, are in Python 3.

A bit more info here: Why would we use Python 2 or 3?