Python not working the same way in Visual Studio Code


Hello guys! :slight_smile:
I just started programming, and i am not doing the “Learn Python Course” - I learn a lot of new stuff, and i love the guide - the problem is just that whenever i learn something, and wanna try it out on my programming app, it dosent work eventho i write the exact same code. I use Visual Studio Code, and it is off course linked up with Python - is it because they use another kind of language that isnt Visual Studio Code? What is the name of that language? - Sorry if i the solution is obvious or im just stupid, as i said before im totally new :stuck_out_tongue:

  • LHeiin

Strings and Console Output


visual studio code is just an editor, you write the python code in. Executing the python code requires the python interpreter. Maybe there is a difference between the python interpreter between codecademy and your system? Just like with other software, there are different python versions


Do you know how im able to fix it?


yes, but i gave you big clue already (python version), the more steps you take yourself, the better you are learning


Hi, I have same problem,
what’s codecademy Python version?


And why don’t different versions don’t understand same code ?,

I mean if I put 2+2 in one thusand different calculators, all of them will understand simbols, operators and return 4,

Is that difficult to do in code languages?
It’s frustrating

import sys
print sys.version

that should help you find out what version codecademy is running

programming has never been simple, and it never will


You can type the code in vs code
Open the integrated terminal with ctrl + '
And then write python <file name>
use python command to use python 2
Codecademy uses python 2
If you want to use python 3, write python3


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