What you'll learn
- Check that you have everything you need before you start, which is very little
- Install Python 3.14 and Visual Studio Code on Windows, macOS, or Linux
- Use the four terminal commands you need to move around and run programs
- Run Python in two ways: interactively in the REPL and from a file
- Follow along with the code in every lesson the same way
Concept
You need three things to start: a computer you can install software on, the ability to open a folder and create a file, and patience for error messages. That is the whole list. No math beyond arithmetic, no previous programming.

Python itself is a program. When you "run Python" you start that program and hand it your code, either one line at a time or as a whole file. Both ways are useful, and you will use both in every lesson.

The interactive mode is called the REPL, short for read, evaluate, print, loop. You type an expression after the >>> prompt, Python evaluates it and prints the result, then waits for the next one. It is the fastest way to try an idea. Since Python 3.13 the REPL has color and multi-line editing, and Python 3.14 added syntax highlighting as you type, so it is pleasant to live in.
Running a file is how real programs work. You save your code in a file ending in .py, then ask Python to run that file from top to bottom. Everything in this course is written as files, because files can be saved, shared, tested, and shipped.
Here is what happens when you install Python and run a file for the first time.

Install steps differ a little by operating system, so here is the short version for each.
| System | Install Python | Open a terminal |
|---|---|---|
| Windows | python.org installer, tick "Add python.exe to PATH" | Windows Terminal or PowerShell |
| macOS | python.org installer, or brew install python@3.14 |
Terminal app |
| Linux | Your package manager, or uv python install 3.14 |
Any terminal |
You will run Python from a terminal, so you need four commands and no more. pwd prints the folder you are in, ls lists what is in it (dir on Windows PowerShell also works), cd name moves into a folder and cd .. moves back up, and python3 file.py runs a program. Everything else the terminal can do, you can learn later.
| Command | What it does |
|---|---|
pwd |
show the folder you are in |
ls |
list the files in this folder |
cd course |
move into the folder called course |
python3 hello.py |
run a program with Python |
Following along works the same way in every lesson. Each code block names its file on the first line, like # hello.py. Create a file with that name in your course folder, type the code exactly, save, and run it with python3 hello.py. The output block right under the code is what the lesson got when it ran the same file. If yours matches, move on; if it does not, the difference is the lesson.
For the editor, install Visual Studio Code and its official Python extension. It is free, it runs everywhere, and it is what most Python developers use. When VS Code asks you to Select Interpreter, pick the 3.14 you just installed.
Code
First, confirm Python is installed and is the version this course uses. Open a terminal, type the command, and compare the output. On some systems the command is python instead of python3; whichever prints a version starting with 3.14 is the one to use.
# check_version.sh
python3 --version
Python 3.14.7Now the program every programmer writes first. Create a folder for this course, create a file inside it called hello.py, and type this one line. Save it.
# hello.py
print("Hello, world!")
Hello, world!In the terminal, move into your folder with cd and run the file with python3 hello.py. That output block is what you should see. If you do, you have a working Python setup and you have run your first program.
The REPL works differently: you type expressions and get answers immediately without a file. Start it by typing python3 on its own, and leave it by typing exit(). This script does in a file what you would type there interactively, so the output is identical either way.
# repl_demo.py
print(2 + 3)
print("py" * 3)
print(len("hello"))
5
pypypy
5Try it yourself
Change hello.py so it prints your own name on a second line, run it again, and confirm both lines appear. Then start the REPL, type 7 * 6, press Enter, and type exit() to leave. That is the whole loop you will repeat thousands of times: edit, run, read.
Common mistakes
- Installing Python but not ticking "Add to PATH" on Windows. The terminal then says it cannot find
python. Re-run the installer and tick the box, or usepyinstead ofpython. - Running the file from the wrong folder.
python3 hello.pyonly works if the terminal is in the folder that containshello.py. Usecdto get there, or open the folder in VS Code and use its built-in terminal. - Typing code into the REPL and expecting it to be saved. The REPL forgets everything when you leave it. Anything you want to keep goes in a
.pyfile.
What's next
- You need very little to start: a computer, a folder, a file, and patience with error messages.
- Four terminal commands are enough:
pwd,ls,cd, andpython3 file.py; the REPL is for trying ideas,.pyfiles are for programs you keep. - Check
python3 --versionshows 3.14, runhello.py, and you are set up for everything ahead.
Your tools work and you have run a program. Next you will learn the few layout rules every Python file follows, including the indentation that trips up almost every newcomer once.