A hands-on lab to understand how your computer actually works — files, memory, the terminal, and paths. No prior knowledge needed. Every concept is learned by doing.
Everything on your computer — every photo, every song, every document — is stored as a file. Let's understand what that means.
Think of your computer as a huge filing cabinet. Each drawer is a folder. Inside each drawer, there are pieces of paper — those are files. Some papers have text on them (documents), some have pictures (images), some have music notes (audio files). The paper itself is always the same material — what's written on it is what makes it different.
A file is a named collection of data stored on your computer. That data could be anything: text you typed, a photo you took, a song you downloaded, or instructions that tell your computer to do something. Every file has two important things: a name (so you can find it) and contents (the actual data inside).
A folder (also called a directory) is a container that holds files — and even other folders. Folders exist only to keep things organized. Think of a folder on your desk: it doesn't contain information itself, it just groups related papers together. Your computer uses folders the same way: a "Photos" folder holds image files, a "Documents" folder holds text files, and so on.
Let's find and look at actual files on your computer right now.
Let's make a brand-new file from scratch.
Hello, I am learning about computers!my-first-file.txtpython-course and press Enter.my-first-file.txt from the Desktop into the python-course folder. (Click and hold the file, move your mouse over the folder, and release.)python-course folder. You should see my-first-file.txt inside it. You just organized a file into a folder!What's the difference between a file and a folder?
Your computer has two different types of memory, and understanding the difference explains a LOT about how computers work.
Imagine you're doing homework.
Your bookshelf is like your hard disk — it stores all your books permanently. Even when you leave the room, the books stay there. It holds a lot, but you can't read directly from the shelf — you have to first pull a book out.
Your desk is like your RAM — it's the space where you place the books you're currently reading. Your desk is small (you can only fit a few books at a time), but it's fast to grab anything on it. When you leave the room (turn off the computer), everything on the desk gets put away — the desk becomes empty.
The hard disk (also called SSD or hard drive) is where your computer stores everything permanently. All your files, all your apps, your operating system (Windows or macOS) — everything lives here. Even when you turn off your computer, everything on the hard disk stays safe. Hard disks are large (256 GB to several TB) but relatively slow to read from.
RAM stands for Random Access Memory. It's your computer's short-term, fast memory. When you open a file or a program, your computer copies it from the hard disk into RAM so it can work with it quickly. RAM is small (typically 4–32 GB) but very fast. The catch: RAM is temporary. When you shut down your computer, everything in RAM disappears.
You're writing a document in Notepad and haven't pressed "Save" yet. Then the power goes out. Is your work lost? Why?
Your computer has 500 GB of files but only 8 GB of RAM. How does it manage?
Not all files are created equal. Some files are data you look at. Others are instructions your computer can actually run.
Think of a recipe card vs. a photograph of food.
The photograph is just something you look at — it doesn't do anything. That's a non-executable file (like a .txt, .jpg, or .pdf). It's just data.
The recipe card has instructions that someone can follow to cook a meal. That's an executable file — it tells your computer to do something. When you double-click Chrome or Notepad, you're running an executable file.
These files just contain data. They need another program to open and display them. A .txt file needs Notepad to open it. A .jpg image needs a photo viewer. A .mp3 song needs a music player. By themselves, these files don't do anything — they just sit there holding information.
These files contain instructions that your computer's processor can follow. When you "run" them, your computer reads the instructions and performs actions — opens a window, plays a sound, connects to the internet, etc. On Windows, these typically end in .exe. On Mac, they're usually inside .app bundles. Every app on your computer — Chrome, Spotify, Notepad — is an executable file.
C:\Windows. Scroll down and find a file called notepad.exe. See the .exe at the end? That means it's an executable — a program your computer can run..pdf, .docx, .jpg files — these are NOT executables. They're data files.python-course folder, then double-click my-first-file.txt (from Module 1). Notice: the file didn't do anything on its own — Notepad (an executable) had to open and display it.Calculator. Click it. A calculator appears! That calculator is an executable — it contains instructions that tell your computer to draw buttons, do math, etc..txt file needed a program to open it. The Calculator is a program — it runs on its own.Because executable files can tell your computer to do anything, they can be dangerous if they come from unknown sources. A .txt file can't harm your computer — it's just text. But a mysterious .exe file from an unknown email? That could be a virus. Rule of thumb: Never run executable files from sources you don't trust.
Someone sends you a file called vacation-photo.jpg.exe. Should you open it?
.exe, which means it's an executable program, NOT a photo. The ".jpg" in the middle is just part of the name to trick you into thinking it's an image. This is a common trick used by malware. The file extension that matters is always the last one.Every file name has two parts: the name and the extension. The extension tells your computer (and you) what kind of file it is.
A file extension is the part after the last dot in a file name. In report.pdf, the extension is .pdf. In photo.jpg, the extension is .jpg. The extension is like a label on a food container — it tells you what's inside. It also tells your computer which program should open the file.
| Extension | What It Is | Opened By |
|---|---|---|
.txt | Plain text (no formatting) | Notepad, TextEdit |
.pdf | Formatted document (read-only look) | Adobe Reader, browser |
.docx | Microsoft Word document | Microsoft Word, Google Docs |
.jpg / .png | Image / photo | Photo viewer, browser |
.mp3 | Audio / music | Music player, browser |
.mp4 | Video | Video player, browser |
.html | Web page | Web browser |
.py | Python code | Python interpreter |
.exe | Windows program (executable) | Windows itself |
.zip | Compressed archive (multiple files packed into one) | File Explorer, WinZip |
.csv | Data in rows and columns (comma-separated) | Excel, Notepad |
By default, your computer might be hiding file extensions from you. Let's fix that — you always want to see them.
document.pdf or image.png instead of just "document" or "image".python-course folder and open it.my-first-file.txt: right-click it → Copy → right-click in empty space → Paste. You'll get a file called something like my-first-file - Copy.txt.my-first-file-copy.jpg (change .txt to .jpg). If asked "are you sure?", click Yes.my-first-file-copy.jpg. Your computer will try to open it as an image — but it will fail or show garbled nonsense. Why? Because the file's actual content is still plain text, not image data. Changing the extension doesn't change the content..txt to fix it.Extensions matter for two reasons: they tell your computer which program to use when you double-click a file, and they help you quickly understand what a file contains. But they don't change the actual data inside. Renaming photo.jpg to photo.txt doesn't turn the image into text — it just confuses your computer about how to open it. The extension is a label, not a converter.
You download a file called notes with no extension. Can you still open it?
You've been using your computer by clicking icons and buttons. That's called a graphical interface. But there's another way to talk to your computer: by typing text commands.
Imagine you're at a restaurant. You can either:
A) Point at pictures on the menu (that's like using the graphical interface — clicking icons), or
B) Tell the waiter exactly what you want by speaking (that's like using the terminal — typing commands).
Both get you food. But speaking lets you be much more specific: "I want the pasta, but with half the garlic, extra cheese, and gluten-free noodles." The terminal gives you that kind of precise control over your computer.
The terminal (also called command line, command prompt, or shell) is a text-based way to control your computer. Instead of clicking buttons, you type commands and press Enter. The computer reads your command, does what you asked, and prints the result as text. It looks like a black (or dark) window with text — that's it. No icons, no buttons. Just you and the computer, communicating through text.
As a programmer, you'll use the terminal every day. Here's why: it's faster for many tasks (no need to navigate through 5 menus), it's more powerful (you can do things that aren't available through clicking), and most programming tools are designed to be used from the terminal. Python itself is run from the terminal.
cmd, and click "Command Prompt". A black window with white text will appear.powershell instead — it does the same thing but with more features. For now, either works.)
Terminal, press Enter. A window will appear with a text prompt.That blinking cursor is the terminal waiting for you to type a command. The text before the cursor is called the prompt — it tells you where you are on your computer (more on that in Module 7).
The command echo simply tells the computer: "repeat back what I typed." It's the simplest command there is. You just gave your computer an instruction, and it followed it!
Let's see what happens when you type something the computer doesn't understand.
blahblah and press Enter.This is important: The terminal doesn't crash. It just tells you it didn't understand. Error messages are your friend — they tell you what went wrong. You'll see many of these as a programmer, and that's completely normal.
What are two different names for "the terminal"?
Now that the terminal is open, let's learn some actual commands. We'll start with commands that show you information — they don't change anything, they just let you look around.
Most commands look like this: command-name options target. For example: dir /w C:\Users. Here, dir is the command (list directory contents), /w is an option (show in wide format), and C:\Users is the target (which folder to list). Not every command needs options or a target — some work by themselves.
When you open the terminal, you're always "standing inside" a specific folder. Let's find out which one.
This tells you your current directory — the folder the terminal is currently "inside." Every command you run will happen in the context of this folder.
dir (Windows) or ls (Mac) and press Enter.<DIR> (Windows) are folders. Everything else is a file.These commands ask your computer for information. They don't change anything — they're read-only.
whoami and hostname. Write down what they output for you.whoami tells you which user account is logged in. hostname tells you the name of your physical computer.Your terminal is getting cluttered with all the commands you've typed. Let's clean it up.
The screen is now blank again. Don't worry — nothing was deleted. The previous commands still happened, you just cleared the display. Think of it like erasing a whiteboard — the lessons still happened.
Just like every house has a street address, every file and folder on your computer has an address called a path. This is one of the most important concepts in programming.
Think of a mailing address: 123 Oak Street, Apartment 4B, Springfield.
On a computer, a path works the same way: C:\Users\Sarah\Documents\homework.txt means: "On drive C, go into the Users folder, then into Sarah's folder, then into Documents, and there you'll find homework.txt."
Each \ (Windows) or / (Mac) is like saying "go inside the next folder."
A folder path points to a folder (a container): C:\Users\Sarah\Documents. A file path points to a specific file inside a folder: C:\Users\Sarah\Documents\homework.txt. The difference? A file path ends with a file name (which has an extension like .txt). A folder path doesn't.
python-course folder you created earlier.C:\Users\YourName\Desktop\python-course.C:\Users\YourName\Desktop\python-course\my-first-file.txtThe command cd (which stands for "change directory") lets you move into a different folder in the terminal.
cd .. a few more times to go up further. You can go all the way up to C:\ (Windows) or / (Mac) — that's the very top, called the root.Let's read the contents of my-first-file.txt without opening Notepad — using just the terminal.
You just read a file entirely from the terminal — no Notepad, no clicking. The command type (Windows) or cat (Mac) prints a file's contents right into the terminal.
You don't always have to cd into a folder first. You can give the full path directly.
This is an absolute path — the complete address starting from the root. It works no matter where you currently are in the terminal.
What does cd .. do?
cd .. moves you one folder up (to the parent directory). The .. is a special shortcut that always means "the folder above me." If you're in C:\Users\Sarah\Desktop, running cd .. takes you to C:\Users\Sarah.What's the difference between C:\Users\Sarah\Documents and C:\Users\Sarah\Documents\report.pdf?
report.pdf) that lives inside that folder. A file path always ends with a file name (including its extension).You'll need to install Python (and other tools) to start programming. But what does "downloading" and "installing" actually mean?
When you "download" something, your computer connects to another computer somewhere on the internet and copies a file from that computer to your hard disk (usually into the Downloads folder). That's it. The file now exists on your computer, but it's not set up to use yet — it's just sitting in your Downloads folder.
Installing means running the downloaded file (which is usually an installer/setup program) to put the software in the right place and configure it. Installation typically does several things: copies program files to a proper location (like C:\Program Files), creates shortcuts (Start menu, Desktop), and registers the program with your system so the terminal and other programs can find it. Think of it like this: downloading is buying furniture online, installing is assembling it and putting it in the right room.
.pdf files, .jpg images, maybe .exe or .dmg files..exe (Windows) or .dmg (Mac) files are installers — programs that were downloaded but maybe not yet installed (or already installed and the installer is leftover).Let's find the actual location on your hard disk where a program lives after installation.
where notepad (Windows) or which python3 (Mac) and press Enter.When you install a program and the installer asks "Add to PATH?", it means: register this program's location so the terminal can find it by name. Without being on the PATH, you'd have to type the full location every time (like C:\Python312\python.exe). With it on the PATH, you can just type python. When we install Python later, we'll make sure to check "Add to PATH" — this is critical.
When you install Python in a future class, the installer will show a checkbox that says "Add Python to PATH" (or similar). Always check this box. If you don't, typing python in the terminal won't work — the terminal won't know where to find it.
You've been typing commands and seeing results. But what's actually happening inside your computer between pressing Enter and seeing the output?
When you type a command (like echo Hello) and press Enter, here's exactly what happens:
Let's prove that Step 3 really happens — that the terminal has to find the program first.
where notepad (Windows) or which ls (Mac). The result shows you where on the hard disk that program lives.where pizzamaker or which pizzamaker. It says "not found" — because no program with that name exists on your computer. This is the exact same thing that happens when you mistype a command.where python (Windows) or which python3 (Mac). If Python is installed AND on your PATH, you'll see its location. If not, you'll see "not found" — which means either Python isn't installed or it wasn't added to the PATH.Let's see Step 4 in action — a program being loaded into RAM.
notepad (Windows) or open -a TextEdit (Mac) and pressing Enter.All our commands so far have been instant. Let's try one that takes a visible amount of time, so you can see your computer actually working.
ping google.com and press Enter. Watch the results come in one line at a time — each line is your computer sending a message to Google's server and measuring how fast the reply comes back.Ctrl + C is a universal "stop this command" shortcut in the terminal.You type python in the terminal and get "not recognized" / "command not found". Based on what you learned, what went wrong?
When you run a command, which types of memory are involved, and in what order?
Check off each item you feel confident about. If any feel shaky, go back and redo that module's tasks.
In Day 1, we'll install Python on your computer, write your first Python program, and run it from the terminal. Everything you learned today — files, paths, the terminal, executables, the PATH — will all come together. You're more prepared than you think.