Python Course — Day 0

Before You Write Code

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.

Lab Modules

What Are Files?

Everything on your computer — every photo, every song, every document — is stored as a file. Let's understand what that means.

🏠 Real-World Analogy

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.

💡 What Is a File?

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).

💡 What Is a Folder?

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.

TASK 1.1 See Files on Your Own Computer

Let's find and look at actual files on your computer right now.

  1. On Windows: Double-click the yellow folder icon called "File Explorer" on your taskbar (the bar at the bottom of your screen). On Mac: Click the blue-and-white smiley face icon called "Finder" on your dock (the bar at the bottom).
  2. You should now see a window showing folders like "Desktop", "Documents", "Downloads", "Pictures", etc. These are folders that came pre-created on your computer.
  3. Click on the "Documents" folder. Inside, you'll see files (and maybe more folders). Notice that each file has a name and a small icon that represents what kind of file it is.
  4. Now click on the "Downloads" folder. Anything you've ever downloaded from the internet lands here.
TASK 1.2 Create Your First File

Let's make a brand-new file from scratch.

  1. Open a program called Notepad (on Windows: press the Windows key, type "Notepad", click it) or TextEdit (on Mac: press Cmd+Space, type "TextEdit", click it).
  2. A blank white area will appear. This is where you type. Type this sentence exactly: Hello, I am learning about computers!
  3. Now save this file. Press Ctrl + S (on Mac: Cmd + S). A "Save" dialog box will appear.
  4. In the "File name" field, type: my-first-file.txt
  5. For the location, choose your Desktop (so you can easily see it later). Click "Save".
  6. Now minimize or close Notepad. Look at your Desktop. You should see a new file icon called my-first-file.txt. You just created a file!
TASK 1.3 Create Your First Folder and Move a File
  1. On your Desktop, right-click on an empty area (not on an icon). A menu will appear.
  2. Click "New" → "Folder" (on Mac: right-click → "New Folder").
  3. A new folder will appear. It's asking you to type a name. Type: python-course and press Enter.
  4. Now drag the file 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.)
  5. Double-click the python-course folder. You should see my-first-file.txt inside it. You just organized a file into a folder!
🤔 Check Your Understanding

What's the difference between a file and a folder?

A file holds actual data — text, images, music, code, etc. A folder does not hold data itself — it's just a container that organizes files (and other folders). Think of files as the papers and folders as the drawers.

Hard Disk vs. RAM

Your computer has two different types of memory, and understanding the difference explains a LOT about how computers work.

🏠 Real-World Analogy

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.

💡 Hard Disk (Storage)

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 (Working Memory)

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.

HARD DISK Permanent storage 256 GB – 2 TB Slower Survives shutdown ✓ OPEN SAVE RAM Temporary workspace 4 GB – 32 GB Very fast Erased on shutdown ✗
TASK 2.1 See How Much Hard Disk Space You Have
  1. On Windows: Open File Explorer (yellow folder icon). In the left panel, click "This PC". You'll see your drives (usually "C:") with a bar showing how much space is used and how much is free. On Mac: Click the Apple logo (top-left corner) → "About This Mac" → "More Info" → "Storage".
  2. Write down: How much total space does your hard disk have? How much is used? How much is free?
  3. This is where every single file on your computer lives — all your photos, apps, videos, everything.
TASK 2.2 See How Much RAM You Have
  1. On Windows: Right-click the Start button → click "System". Look for "Installed RAM". On Mac: Click the Apple logo → "About This Mac". Look for "Memory".
  2. Write down: How much RAM does your computer have?
  3. Notice the difference: your hard disk probably has hundreds of GB. Your RAM probably has 8 or 16 GB. RAM is much smaller — it's only for things you're working on right now.
TASK 2.3 Watch RAM in Action
  1. On Windows: Press Ctrl + Shift + Esc to open Task Manager. Click the "Performance" tab, then click "Memory". On Mac: Open "Activity Monitor" (press Cmd+Space, type "Activity Monitor", press Enter). Click the "Memory" tab.
  2. Look at the graph. This shows how much RAM is currently being used. It might say something like "5.2 GB / 16 GB".
  3. Now, open a web browser (like Chrome or Edge). Open 5 new tabs and load a different website in each one. Watch the RAM usage go up.
  4. Close all those tabs. Watch the RAM usage go down.
  5. This is the key insight: RAM is used by programs while they're running. Close a program, and it frees up RAM.
🤔 Check Your Understanding

You're writing a document in Notepad and haven't pressed "Save" yet. Then the power goes out. Is your work lost? Why?

Yes, your work is lost. Before you press Save, your work only exists in RAM (the fast temporary memory). RAM needs electricity to keep its data. When the power goes out, RAM is erased. Pressing "Save" copies the data from RAM to the hard disk, where it survives power loss.
🤔 Check Your Understanding

Your computer has 500 GB of files but only 8 GB of RAM. How does it manage?

It doesn't need to load all 500 GB at once! The computer only loads the files and programs you're currently using into RAM. If you're running a browser and Notepad, maybe only 3 GB of your 500 GB is in RAM right now. The rest stays on the hard disk, waiting until you need it.

Executable vs. Non-Executable Files

Not all files are created equal. Some files are data you look at. Others are instructions your computer can actually run.

🏠 Real-World Analogy

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.

💡 Non-Executable Files (Data)

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.

💡 Executable Files (Programs)

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.

TASK 3.1 Find an Executable File
  1. On Windows: Open File Explorer. Navigate to 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.
  2. On Mac: Open Finder. Click "Applications" in the sidebar. Every item here (like "Safari.app", "Calculator.app") is an executable application.
  3. Now go to your Documents or Downloads folder. Look at the files there. You'll see .pdf, .docx, .jpg files — these are NOT executables. They're data files.
TASK 3.2 Observe the Difference in Behavior
  1. Go to your Desktop and double-click the 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.
  2. Now let's see what happens when you run an executable. Press the Windows key (or Cmd+Space on Mac) and type Calculator. Click it. A calculator appears! That calculator is an executable — it contains instructions that tell your computer to draw buttons, do math, etc.
  3. Key insight: The .txt file needed a program to open it. The Calculator is a program — it runs on its own.
⚠️ Safety Note

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.

🤔 Check Your Understanding

Someone sends you a file called vacation-photo.jpg.exe. Should you open it?

No! This file ends in .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.

File Extensions — What's After the Dot?

Every file name has two parts: the name and the extension. The extension tells your computer (and you) what kind of file it is.

💡 What Is a File Extension?

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
.txtPlain text (no formatting)Notepad, TextEdit
.pdfFormatted document (read-only look)Adobe Reader, browser
.docxMicrosoft Word documentMicrosoft Word, Google Docs
.jpg / .pngImage / photoPhoto viewer, browser
.mp3Audio / musicMusic player, browser
.mp4VideoVideo player, browser
.htmlWeb pageWeb browser
.pyPython codePython interpreter
.exeWindows program (executable)Windows itself
.zipCompressed archive (multiple files packed into one)File Explorer, WinZip
.csvData in rows and columns (comma-separated)Excel, Notepad
TASK 4.1 Make File Extensions Visible

By default, your computer might be hiding file extensions from you. Let's fix that — you always want to see them.

  1. On Windows 11: Open File Explorer → Click "View" in the top menu → Click "Show" → Check "File name extensions". On Windows 10: Open File Explorer → Click "View" tab → Check "File name extensions".
  2. On Mac: Open Finder → Click "Finder" in the top menu bar → "Settings" (or "Preferences") → "Advanced" tab → Check "Show all filename extensions".
  3. Now browse your Downloads folder. You should see the full names like document.pdf or image.png instead of just "document" or "image".
TASK 4.2 See What Happens When You Change an Extension
  1. Go to your Desktop. Right-click your python-course folder and open it.
  2. Make a copy of 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.
  3. Right-click the copy → click "Rename". Change its name to my-first-file-copy.jpg (change .txt to .jpg). If asked "are you sure?", click Yes.
  4. Now try to double-click 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.
  5. Rename it back to .txt to fix it.

💡 Do Extensions Really Matter?

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.

🤔 Check Your Understanding

You download a file called notes with no extension. Can you still open it?

Yes, but it's harder. Your computer won't know which program to use automatically. You'd have to right-click → "Open with" and choose a program yourself (try Notepad first). If it shows readable text, it was probably a text file. If it shows gibberish, try other programs. The data is still in the file — the extension is just a hint for your computer.

The Terminal — That Black Window

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.

🏠 Real-World Analogy

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.

💡 What Is the Terminal?

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.

💡 Why Do Programmers Use It?

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.

TASK 5.1 Open the Terminal for the First Time
  1. On Windows: Press the Windows key, type cmd, and click "Command Prompt". A black window with white text will appear.
    (Alternative: type powershell instead — it does the same thing but with more features. For now, either works.)
  2. On Mac: Press Cmd + Space, type Terminal, press Enter. A window will appear with a text prompt.
  3. You should see something like this:
Terminal / Command Prompt
# On Windows you'll see something like:
C:\Users\YourName> _

# On Mac you'll see something like:
yourname@MacBook ~ % _

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).

TASK 5.2 Type Your First Command
  1. In the terminal, type the following and press Enter:
Your first command
# Windows:
C:\Users\YourName> echo Hello World
Hello World

# Mac:
~ % echo Hello World
Hello World

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!

TASK 5.3 Try a Command That Fails

Let's see what happens when you type something the computer doesn't understand.

  1. Type blahblah and press Enter.
An error
C:\Users\YourName> blahblah
'blahblah' is not recognized as an internal or external command,
operable program or batch file.

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.

🤔 Check Your Understanding

What are two different names for "the terminal"?

It's also called the command line, command prompt (Windows), shell, or console. They all refer to the same idea: a text-based way to give instructions to your computer.

Terminal Commands — Talking to Your Computer

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.

💡 Anatomy of a Command

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.

TASK 6.1 Find Out Where You Are

When you open the terminal, you're always "standing inside" a specific folder. Let's find out which one.

Print current location
# Windows: "cd" by itself shows current directory
C:\Users\YourName> cd
C:\Users\YourName

# Mac: "pwd" means "Print Working Directory"
~ % pwd
/Users/YourName

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.

TASK 6.2 List the Files in the Current Folder
Listing files
# Windows:
C:\Users\YourName> dir
Volume in drive C is Windows
Directory of C:\Users\YourName

03/30/2026 09:15 AM <DIR> Desktop
03/30/2026 09:15 AM <DIR> Documents
03/28/2026 02:30 PM <DIR> Downloads
03/25/2026 10:00 AM 1,024 notes.txt

# Mac:
~ % ls
Desktop Documents Downloads notes.txt
  1. Type dir (Windows) or ls (Mac) and press Enter.
  2. You'll see a list of files and folders. Items marked with <DIR> (Windows) are folders. Everything else is a file.
  3. Compare this to what you see when you open the same folder in File Explorer / Finder. It's the same content — just shown as text instead of icons.
TASK 6.3 Check Today's Date and Time
Date and time commands
# Windows:
C:\Users\YourName> date /t
Mon 03/30/2026
C:\Users\YourName> time /t
10:45 AM

# Mac:
~ % date
Mon Mar 30 10:45:00 CDT 2026

These commands ask your computer for information. They don't change anything — they're read-only.

TASK 6.4 See Your Computer's Name and User
System info commands
# Windows — your username:
C:\Users\YourName> whoami
desktop-abc123\yourname

# Windows — your computer's name:
C:\Users\YourName> hostname
DESKTOP-ABC123

# Mac — same commands work:
~ % whoami
yourname
~ % hostname
YourNames-MacBook.local
  1. Try both whoami and hostname. Write down what they output for you.
  2. whoami tells you which user account is logged in. hostname tells you the name of your physical computer.
TASK 6.5 Clear the Screen

Your terminal is getting cluttered with all the commands you've typed. Let's clean it up.

Clean slate
# Windows:
C:\Users\YourName> cls

# Mac:
~ % clear

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.

✅ Commands Learned So Far


Paths — Every File Has an Address

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.

🏠 Real-World Analogy

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."

💡 Folder Path vs. File Path

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.

C:\ (root) Users Windows Sarah Alex Desktop Documents homework.txt notes.pdf PATH TO homework.txt: C:\Users\Sarah\Documents\homework.txt
TASK 7.1 Find the Path of Your File
  1. Open File Explorer (Windows) or Finder (Mac).
  2. Navigate to your Desktop, then open the python-course folder you created earlier.
  3. On Windows: Click the address bar at the top of the File Explorer window. It will change from showing breadcrumbs to showing the full path, like C:\Users\YourName\Desktop\python-course.
  4. On Mac: Right-click the folder name at the top of the Finder window, or press Cmd+Option+P to show the full path bar at the bottom.
  5. Write down the full path. This is the address of your python-course folder.
  6. Now think about the file inside it. The path to your file would be that folder path plus the file name: C:\Users\YourName\Desktop\python-course\my-first-file.txt
TASK 7.2 Navigate Folders in the Terminal

The command cd (which stands for "change directory") lets you move into a different folder in the terminal.

Navigating with cd
# Step 1: Check where you are right now
C:\Users\YourName> cd
C:\Users\YourName

# Step 2: Move into the Desktop folder
C:\Users\YourName> cd Desktop
C:\Users\YourName\Desktop>

# Step 3: Move into python-course folder
C:\Users\YourName\Desktop> cd python-course
C:\Users\YourName\Desktop\python-course>

# Step 4: List what's inside
C:\Users\YourName\Desktop\python-course> dir
03/30/2026 09:00 AM 35 my-first-file.txt

# Step 5: Go back UP one folder
C:\Users\YourName\Desktop\python-course> cd ..
C:\Users\YourName\Desktop>

# "cd .." means "go to the parent folder" — one level up
  1. Follow the steps above in your terminal. Make sure to observe how the prompt changes as you move into different folders — it always shows your current location.
  2. Try 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.
TASK 7.3 Read a File from the Terminal

Let's read the contents of my-first-file.txt without opening Notepad — using just the terminal.

Reading a file
# First, navigate to the folder
C:\Users\YourName> cd Desktop\python-course

# Windows — display file contents:
...\python-course> type my-first-file.txt
Hello, I am learning about computers!

# Mac — display file contents:
python-course % cat my-first-file.txt
Hello, I am learning about computers!

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.

TASK 7.4 Use a Full Path Instead of Navigating

You don't always have to cd into a folder first. You can give the full path directly.

Using full paths
# Windows — read file using its full path (from anywhere):
C:\Users\YourName> type C:\Users\YourName\Desktop\python-course\my-first-file.txt
Hello, I am learning about computers!

# Mac — same idea:
~ % cat /Users/YourName/Desktop/python-course/my-first-file.txt
Hello, I am learning about computers!

This is an absolute path — the complete address starting from the root. It works no matter where you currently are in the terminal.

🤔 Check Your Understanding

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.
🤔 Check Your Understanding

What's the difference between C:\Users\Sarah\Documents and C:\Users\Sarah\Documents\report.pdf?

The first is a folder path — it points to the Documents folder itself. The second is a file path — it points to a specific file (report.pdf) that lives inside that folder. A file path always ends with a file name (including its extension).

Downloading & Installing Software

You'll need to install Python (and other tools) to start programming. But what does "downloading" and "installing" actually mean?

💡 Downloading = Copying a File from the Internet to Your Hard Disk

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 = Setting Up the Software So Your Computer Can Use It

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.

TASK 8.1 Examine Your Downloads Folder
  1. Open File Explorer / Finder and go to your Downloads folder.
  2. Look at the files there. You'll probably see a mix of things: .pdf files, .jpg images, maybe .exe or .dmg files.
  3. The .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).
  4. Notice: just because a file is in your Downloads folder doesn't mean the software is installed. The file is just sitting there on your hard disk.
TASK 8.2 See What's Installed on Your Computer
  1. On Windows: Press Windows key → type "Add or remove programs" → click it. You'll see a list of every program that has been properly installed on your computer.
  2. On Mac: Open Finder → click "Applications" in the sidebar. This shows all installed applications.
  3. Scroll through the list. Every item here was once downloaded as a file, then installed through a setup process. Each one now lives in a specific folder on your hard disk and is registered with your operating system.
TASK 8.3 Find Where a Program Is Actually Installed

Let's find the actual location on your hard disk where a program lives after installation.

Finding installed programs
# Windows — find where a program is:
C:\Users\YourName> where notepad
C:\Windows\System32\notepad.exe

# Mac — find where a program is:
~ % which open
/usr/bin/open
  1. Open your terminal and type where notepad (Windows) or which python3 (Mac) and press Enter.
  2. The result is the full path to where that program's executable file lives on your hard disk. This is where it was placed during installation.

💡 What Is PATH? (The System PATH Variable)

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.

⚠️ Important for Python Installation Later

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.


What Happens When You Run a Command?

You've been typing commands and seeing results. But what's actually happening inside your computer between pressing Enter and seeing the output?

💡 The Step-by-Step Process

When you type a command (like echo Hello) and press Enter, here's exactly what happens:

STEP 1 You type the command and press Enter. The terminal reads the text you typed and sends it to the shell (the program reading your commands). STEP 2 The shell breaks your command into parts. "echo Hello" → command name: "echo", argument: "Hello" STEP 3 The shell searches for the program on disk. It checks the PATH locations until it finds an executable called "echo". If not found → error. STEP 4 The program is loaded from hard disk into RAM. The executable file's instructions are copied into RAM so the CPU can run them quickly. STEP 5 The CPU executes the instructions, output is printed. The echo program runs, prints "Hello" to the terminal. Program exits. Prompt returns.
TASK 9.1 See the Search-and-Find Process Yourself

Let's prove that Step 3 really happens — that the terminal has to find the program first.

Finding programs
# Windows — where does the terminal find "notepad"?
C:\Users\YourName> where notepad
C:\Windows\System32\notepad.exe

# Now try a command that DOESN'T exist:
C:\Users\YourName> where pizzamaker
INFO: Could not find files for the given pattern(s).

# Mac version:
~ % which ls
/bin/ls
~ % which pizzamaker
pizzamaker not found
  1. Try where notepad (Windows) or which ls (Mac). The result shows you where on the hard disk that program lives.
  2. Now try 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.
  3. Try 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.
TASK 9.2 Watch a Program Use RAM

Let's see Step 4 in action — a program being loaded into RAM.

  1. Open Task Manager (Windows: Ctrl+Shift+Esc) or Activity Monitor (Mac: Cmd+Space → "Activity Monitor").
  2. Look at the current memory usage.
  3. Now open a program — try opening Notepad from the terminal by typing notepad (Windows) or open -a TextEdit (Mac) and pressing Enter.
  4. Look at Task Manager / Activity Monitor again. You'll see "Notepad" or "TextEdit" listed as a running process, using a small amount of RAM (maybe 5–15 MB).
  5. Close Notepad. Watch it disappear from the process list. Its RAM is freed up.
  6. This is the cycle: Hard disk → RAM (when opened) → Back to just hard disk (when closed).
TASK 9.3 Run a Command That Takes Longer

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.

A slow command
# Windows — ping a website (sends 4 test messages):
C:\Users\YourName> ping google.com
Pinging google.com [142.250.80.46] with 32 bytes of data:
Reply from 142.250.80.46: bytes=32 time=12ms
Reply from 142.250.80.46: bytes=32 time=11ms
Reply from 142.250.80.46: bytes=32 time=13ms
Reply from 142.250.80.46: bytes=32 time=11ms

# Mac — same command (press Ctrl+C after a few lines to stop it):
~ % ping -c 4 google.com
  1. Type 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.
  2. On Mac, if the ping doesn't stop by itself, press Ctrl + C to stop it manually. Ctrl + C is a universal "stop this command" shortcut in the terminal.
  3. Notice: while the command is running, you can't type anything else. The terminal is busy. Once it finishes, the prompt comes back and you can type again.
🤔 Check Your Understanding

You type python in the terminal and get "not recognized" / "command not found". Based on what you learned, what went wrong?

The terminal searched through all the locations in the PATH and couldn't find an executable called "python". This means either: (a) Python is not installed on your computer, or (b) Python is installed, but its folder wasn't added to the PATH during installation. In case (b), the Python program exists on your hard disk, but the terminal doesn't know where to look for it.
🤔 Check Your Understanding

When you run a command, which types of memory are involved, and in what order?

First, the program file is found on the hard disk (permanent storage). Then, it's loaded into RAM (fast working memory) so the CPU can execute it. When the program finishes, its data is cleared from RAM. Any files it saved go back to the hard disk. So the flow is: Hard Disk → RAM → CPU executes → result shown on screen.

Day 0 Completion Checklist

Check off each item you feel confident about. If any feel shaky, go back and redo that module's tasks.

🎯 I Can Now…

🚀 What's Next?

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.