Setup20 min+50 XP

Install Python

Put the Python interpreter on your own computer and run your first local program.

0% done
TASK 1

Learn it

Key idea

Install Python from python.org, then check it with a version command.

1DownloadPython2Install it3Open a newterminal4python--version5Runhello.py
Five steps from download to running your first local program.

Now install Python itself. Always get it from the official site, python.org, or the official store for your system. Never download Python from random websites.

Choose the latest Python 3 version offered (3.12 or newer is great). Version numbers look like 3.13.1: everything in this course works on any recent Python 3.

After installing, you will check it with a version command, then write a tiny program in a file and run it. One difference to remember: on macOS and Linux the command is usually python3. On Windows it is python or py.

Real life linkPython is free and used by millions of people. The same Python you install today runs websites, science experiments and robots.
Watch outIf you see "command not found" or "python is not recognized", close the terminal and open a new one first. Still stuck on Windows? Run py install --configure and accept the changes, or reinstall with the classic installer and tick Add python.exe to PATH.
  1. Most Linux systems already have Python 3. Check first:
    python3 --version
  2. Install or update Python with the tools for packages and virtual environments (Ubuntu, Debian and ChromeOS Linux). Type your password if asked:
    sudo apt update
    sudo apt install -y python3 python3-pip python3-venv
  3. Check again:
    python3 --version
    You should see something like
    Python 3.12.3
  4. Create a file. In nano, type print("Hello from my own computer!"), press Ctrl + O, Enter, then Ctrl + X.
    cd ~/code/vault_breaker
    nano hello.py
  5. Run your program:
    python3 hello.py
    You should see something like
    Hello from my own computer!
TASK 2

Capture the flag

+10 XP

On macOS and Linux, which command usually runs Python 3?

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

Hello, local world

+20 XP

Prove Python works on your computer.

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.