Your toolbox: the terminal, an editor, and Python
Set up the three tools every later lab assumes: the terminal your computer already has, VS Code, and Python 3. You'll run the five terminal commands that cover 90% of daily use, write your first program, break it on purpose, and learn to read a traceback — with two simulators to practice on before you touch the real thing.
mindmap — quick refresh
Prerequisites: none — this is the very first stop. If you can use a web browser, you can do this. Time: ~45 minutes including installs.
Three hard facts before anything else:
- Every tool in web development is driven from the terminal. Python, pip, git, database clients, test runners, deployment tools — each one is a program you start by typing its name into a terminal. There is no graphical alternative that covers them all, and you won't need one: day-to-day use is about five commands.
- An IDE is just an editor plus a terminal in one window. Once you know those two pieces separately, no development tool will ever look like magic again.
- You need exactly three installs — and one is already done. A terminal (your computer ships with one), VS Code (a free editor), and Python 3 (a free language). That's the whole toolbox.
Every lab on this site assumes exactly what you'll have at the end of this page: Python 3 installed, terminal basics known. Nothing more.
Meet the terminal
The terminal is a window where you type commands to a program called a shell. The deal is simple: the shell prints a prompt (meaning "ready"), you type one command and press Enter, the shell runs it and prints the result, then prompts again. That's the entire interaction model — a conversation, one line at a time.
Where yours is:
- macOS ships Terminal.app: press Cmd+Space, type
terminal, press Enter. The shell inside is called zsh. - Windows ships PowerShell: press the Windows key, type
powershell, press Enter. - Linux: your desktop has a terminal app front and center; the shell is usually bash.
A prompt like anna@macbook ~ $ has three parts: the machine (user anna, logged into the computer macbook), the folder you're currently standing in (~ is shorthand for your home folder), and a sigil — $ on macOS/Linux, > on PowerShell, as in PS C:\Users\anna> — that means "type here". Your prompt will look a little different; the parts are the same.
Five commands cover 90% of what you'll ever do here: pwd (where am I?), ls (what's here? — dir on Windows), cd (move), mkdir (make a folder), and running a program by name. Walk through all of them in the simulator first — it's a safe fake computer, and the last step hands you the keyboard:
Now on your real machine:
- Open your terminal (see above).
- Type
pwdand press Enter. Expected output (yours will show your username):
/Users/anna
On Windows, pwd works in PowerShell too and prints something like C:\Users\anna.
- Type
ls(Windows:dirorls— PowerShell accepts both). Expected: the folders you already know from Finder/Explorer:
Desktop Documents Downloads ...
- Type
mkdir projects. Expected output: nothing. Silence is how the terminal says "done". This folder will hold everything you build on this site. - Type
cd projects. The folder shown in your prompt changes toprojects. - Type
pwdagain. Expected:
/Users/anna/projects
✓ Check: pwd prints a path ending in projects. You've used four of the five commands and made a home for all your code. The fifth — running a program — needs Python first.
Install Python 3
Python is the programming language the labs use; installing it gives your terminal a new command: python3.
macOS — note that modern macOS ships no python command at all, so the installer is not optional:
- In your browser, go to https://www.python.org/downloads/ and click the yellow "Download Python 3.x" button.
- Open the downloaded
.pkgfile and click through the installer — the defaults are fine. - Open a new terminal window and type
python3 --version. Expected (your minor number will differ; anything 3.10 or newer is fine):
Python 3.12.4
Windows:
- Go to https://www.python.org/downloads/ and download the installer.
- Run it — and before clicking "Install Now", check the box "Add python.exe to PATH" at the bottom of the first screen. Missing this checkbox is the number-one beginner setup failure: Python installs fine, but the terminal can't find it.
- Open a new PowerShell window and type
py --version(thepylauncher always works; plainpython --versionworks too if you checked the box). Expected:
Python 3.12.4
If you instead see 'python' is not recognized..., the checkbox wasn't ticked — rerun the installer, choose Modify, and enable it.
Linux: Python 3 is usually preinstalled — try python3 --version. If not, install it with your package manager (Debian/Ubuntu: sudo apt install python3).
What that checkbox was about: PATH. When you type python3, the shell does not search your whole disk. It walks an ordered list of folders — the PATH — looking for a program with that name, and runs the first match. "Command not found" (or "not recognized") almost always means "the program's folder isn't on that list". That's exactly what the Windows checkbox fixes, and it's why you opened a new terminal window: the shell reads PATH once, at startup.
✓ Check: a version number starting with Python 3. prints. That one command working is everything later labs assume.
Install VS Code
You could write Python in any text editor — and truly, any editor works for these labs; nothing later assumes IDE-specific features. We use VS Code because it's free, runs on all three OSes, and is fact #2 made visible: an editor and a terminal in one window.
- Download VS Code from https://code.visualstudio.com/ and install it (macOS: drag "Visual Studio Code" into Applications; Windows: run the installer, defaults are fine).
- Open it, then choose File → Open Folder and pick the
projectsfolder you made earlier (click "trust the authors" if asked). In VS Code the folder is the unit of work, not individual files: open the folder once, and every file in it appears in the Explorer sidebar. - Open the integrated terminal with
Ctrl+`(backtick — the key above Tab; it's Control even on a Mac), or View → Terminal. Expected: a terminal panel at the bottom whose prompt is already standing insideprojects— nocdneeded. - Install the Python extension: click the Extensions icon in the left sidebar (or Cmd+Shift+X / Ctrl+Shift+X), search for "python", and install the one published by Microsoft (id:
ms-python.python). It adds syntax coloring, error squiggles, and autocompletion.
✓ Check: VS Code shows projects in the Explorer, the terminal panel is open, and typing python3 --version (Windows: py --version) in that panel prints a version number.
Your first program, and the edit-run cycle
All programming runs on one loop: edit the file, run it, read what happened, edit again. Let's go around it — including the part beginners are never shown: what to do when it breaks.
- In VS Code's Explorer, click the New File icon (hover over the
projectsfolder header) and name the filehello.py. The.pyextension marks it as Python. - Type exactly these two lines:
name = "Ada"
print("Hello, " + name)
- Save with Cmd+S / Ctrl+S (the dot on the file tab disappears).
- In the integrated terminal, run it — this is the fifth terminal command, running a program, and its shape is
program file:
python3 hello.py
(Windows: py hello.py.) Expected output:
Hello, Ada
That's a program: Python read your file top to bottom and executed each line.
- Now break it on purpose. On line 2, change
printtopirnt. Save, run again. Expected:
Traceback (most recent call last):
File "/Users/anna/projects/hello.py", line 2, in <module>
pirnt("Hello, " + name)
^^^^^
NameError: name 'pirnt' is not defined. Did you mean: 'print'?
This is a traceback, and reading one is the single most useful beginner skill. Read it bottom-up: the last line says what went wrong (NameError — you used a name Python has never seen; recent Pythons even suggest the fix). The File ... line 2 above it says where. What plus where — the bug is located before you've had to think at all. A traceback isn't the computer scolding you; it's the computer filing a precise bug report.
- Fix the typo, save, run again:
Hello, Ada. One full lap of the edit-run cycle.
Watch the whole loop again in the simulator, then use its buttons to meet the three tracebacks every beginner hits — and practice diagnosing each from the last line first:
✓ Check: you've seen both Hello, Ada and a real traceback, and you can point at which line of your file caused the error. Your toolbox is complete — every lab from here on starts exactly where you're sitting now: a folder open in VS Code, a terminal below it, python3 ready.
Takeaways
- The terminal is a conversation: prompt → one command → result → prompt. Five commands —
pwd,ls(dir),cd,mkdir, and running a program by name — cover 90% of daily use. - PATH explains "command not found". The shell finds programs by searching an ordered list of folders. That's the Windows "Add python.exe to PATH" checkbox, and why you open a new terminal after installing.
- Open folders, not files. File → Open Folder makes the project the unit of work, and the integrated terminal (
Ctrl+`) opens already inside it. - Read tracebacks bottom-up. Last line = what went wrong; the
File ... line Nabove it = where. This one habit turns errors from scary into useful. - The edit-run cycle is programming. Edit → run → read → edit. Every lab that follows is this loop, run many times.
References
- MDN Web Docs. (n.d.). Command line crash course. Mozilla. Retrieved August 22, 2026, from https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Environment_setup/Command_line
- Microsoft. (n.d.). Getting started with Python in VS Code. Retrieved August 22, 2026, from https://code.visualstudio.com/docs/python/python-tutorial
- Python Software Foundation. (n.d.). Python setup and usage (Python documentation). Retrieved August 22, 2026, from https://docs.python.org/3/using/index.html
- Python Software Foundation. (n.d.). The Python tutorial (Python documentation). Retrieved August 22, 2026, from https://docs.python.org/3/tutorial/