0%

0/1 Lessons

Installing Python on Windows

• 1hr 17min

0 / 4 lessons complete

Python Basics

• 28min

0 / 7 lessons complete

Python Variables

• 41min

0 / 8 lessons complete

Even more Python Variables!

• 41min

0 / 6 lessons complete

Conditional Statements

• 15min

0 / 3 lessons complete

Writing Functions

• 30min

0 / 5 lessons complete

Python Loops

• 23min

0 / 5 lessons complete

Python PIP and Modules

• 18min

0 / 4 lessons complete

RegEx

• 26min

0 / 4 lessons complete

Working with APIs

• 12min

0 / 3 lessons complete

Course Conclusion

• 2min

0 / 1 lessons complete

Installing and configuring VS Code for Python

Instructions

Q&A (0)

Notes (0)

Resources (0)

Saving Progress...

Resources

There are no resources for this lesson.

Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.

Create note

Visual Studio Code is an excellent IDE (integrated developer environment) that you can use to help write Python code. You can download VS code from the official website at code.visualstudio.com:

Visual Studio Code downloader

Download and install VS Code by selecting the appropriate option. Since this is a Windows course, we are clicking the Windows download button on the left. Once the download completes, run the installer with the default options and start VS Code:

Visual Studio Code Home Screen

Here you can configure the theme you want to use, then let's create a project folder. In VS Code, clcik File > Open Folder:

Open Folder in Visual Studio Code

Browse to the directory where you want to save your Python files for this course, right-click and click New > Folder.

Name it whatever you think is appropriate then click Select Folder:

Next, select Yes when asked about trusting the authors:

VS Code Do you trust the authors of the files in this folder?

Now we can create Python files and folders inside of this directory as desired and they will all be quickly accessible from our VS Code editor. I prefer to have a folder for each project I work on in VS code - but you are free to work any way you see fit. Having a single folder for your work in this course is a great option!

Right-click in the explorer pane and select New File. Name it test.py then press Enter.

VS Code create a new Python file

The new file will open:

Install the Python 3 recommended extension for VS code

Wait for the module installation to complete. This will install the Python module by Microsoft which includes IntelliSense (autocompletion), Linting, debugging and more! If you receive a Windows Security Alert, click Allow Access:

Allow access for VS Code Python module

Copy and paste the following test code into the test.py file:

print("Hello Server Academy")

Now we can execute our Python files by pressing F5. Click Python File when prompted:

Now if we look in the terminal we will see our executed code:

Python Executed code

And that's all we need to do to get started writing Python code in Visual Studio Code!

0 0 votes
Lesson Rating
Subscribe
Notify of
profile avatar
0 Comments
Inline Feedbacks
View all comments