How to work with python on visual studio code


Can somebody tell me how to work with python 3.6.5 on visual studio code?
Thank you


Once you’re in Visual Studio Code, all you need to do is create a Python file in the editor. So, for example, create a file called

Code will recognise that you’re working with Python, and the first time you do this you’ll be prompted to install the Python extension (which allows Code to understand the syntax of the language) as well as the linter which is required if you want it to do auto-complete typing when you’re working with variables and functions etc.

Keep in mind, though, that Visual Studio Code is just a code editor and not an IDE. You won’t be able to run your Python scripts through it, only edit them. If you want to run your code, you’ll need to install Python.


define work with?

There is a guide for this:

what is it your struggling with? You might need to learn how to execute python scripts written with VScode, given codecademy offers a nice run button for it, maybe VScode offers this as well, but you need to learn how to use it


I have dislodges python’s latest version
Style it does not work. What can I do.


style what does not work? Given the problems are with an editor on your computer, its really difficult to get a clear picture. Please try to be descriptive and brief, use screenshots to show the problem.


I am very sorry for that reply. There are some typing errors which I didn’t notice while typing.
The rectified reply is written below-

I have already downloaded python (the latest version). Still the code is not working. Also if I debug, it shows an error.

It is my humble request to you to help me resolve this problem.

Thank you


but what errors? From what code? I can’t guess what errors and/or code you might have

also, if you downloaded python3, ensure that all code is updated to python3. The course teaches python2


Can you be a bit more specific about what error you’re getting, and from where? Ideally, either post the text of the error or a screenshot so we can see what you’re looking at. Will help figure out what’s broken.


The second image:

After entering the any word the console quickly gets closed.

What can I do?

Thank you


i think the error is pretty useful? greater then (>) isn’t allowed between string (original) and integer (0)

What you want to do, is check that the length of original is greater then zero. Given the length is also an integer, comparing integer with greater then operator is fine


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