Skip to main content

A Smart Notebook for Your Code

You could write Python code in a basic program like Notepad, but it would be very difficult.

Instead, programmers use a "smart notebook" called a Code Editor. It highlights your code in different colors, catches spelling mistakes, and makes writing code much easier.

We will use Visual Studio Code (VS Code), which is free and built by Microsoft.


1. Installing Visual Studio Code

  1. Go to code.visualstudio.com.
  2. Download the installer for your computer (Windows or Mac).
  3. Open the downloaded file and click "Next" until the installation is complete.
  4. Open the Visual Studio Code app.

2. Adding the Python Extension

Out of the box, VS Code is just a blank notebook. We need to tell it that we are going to write Python.

  1. Inside VS Code, look at the icons on the far left side. Click the icon that looks like four square blocks (this is the Extensions button).
  2. A search bar will appear. Type Python into the search bar.
  3. Click the first result published by Microsoft.
  4. Click the blue Install button.

3. Creating Your Project Folder

Whenever you start a new coding project, it is best practice to keep all your files in one neat folder so you don't lose them on your computer.

  1. Create a new folder on your computer (for example, in your Documents). Name it Python_Learning.
  2. Go back to VS Code.
  3. Click File -> Open Folder at the top.
  4. Select the Python_Learning folder you just created.

Your smart notebook is now open and pointing to your dedicated learning folder!


What's Next?

You have Python installed and your smart notebook ready. It's time for the most exciting part: writing your very first program in the next lesson!