Setup20 min+50 XP

Install VS Code

A professional editor with colours, auto-complete and a Run button. Free forever.

0% done
TASK 1

Learn it

Key idea

VS Code shows your files, your code and a terminal in one window.

Key words
vault_breaker - Visual Studio CodeEXPLORER.venvhello.pymain.py.gitignorehello.py$ python hello.pyHello from my own computer!123451  Extensions: install Python here2  Explorer: your project files3  Editor: write your code4  Run button: runs this file5  Terminal: Ctrl + ` opens it
The main parts of the VS Code window.

Visual Studio Code (VS Code) is a free code editor from Microsoft. It colours your code, spots mistakes as you type, suggests names and has a built-in terminal. It is the most popular editor in the world.

Out of the box it edits text. The free Python extension (published by Microsoft) teaches it Python: colours, error underlines, a Run button and a debugger.

In VS Code you always open a folder (your project), not single files. That way the file list on the left, the terminal and the Python settings all belong to the project.

Real life linkHandy shortcuts in VS Code: Ctrl + ` opens the terminal, Ctrl + / comments out a line, and Ctrl + Shift + P (Cmd on Mac) opens the command palette, which can do almost anything. Prefer something simpler while you learn? Thonny (thonny.org) is a beginner editor with Python built in.
  1. Go to code.visualstudio.com and download the .deb file (for Ubuntu, Debian and Chromebooks). On a Chromebook, open your Downloads folder, double-click the file and choose Install with Linux.
  2. On Ubuntu or Debian, install the downloaded file from the terminal:
    sudo apt install ./Downloads/code_*.deb
  3. Open VS Code, click the Extensions icon, search for Python, choose the one by Microsoft and click Install.
  4. Open your project:
    cd ~/code/vault_breaker
    code .
  5. Click hello.py, then press the Run triangle at the top right.
    You should see something like
    Hello from my own computer!
TASK 2

Capture the flag

+10 XP

Who publishes the official Python extension for VS Code?

Create a free account to start this lab

Sign in to answer the flag question. Your progress, XP and code are saved to your account. No card needed.

HOMEWORK

Editor ready

+20 XP

Set up VS Code for the rest of the course.

Create a free account to start this lab

Sign in to do this homework and have it checked. Your progress, XP and code are saved to your account. No card needed.