This appendix is the reference shelf for Chapter 1: Python Fundamentals. It keeps long lookup tables outside the main teaching flow while preserving them inside the book for readers who want definitions, tool names, package names, or convention tables while they read.
Appendix A: Glossary and Reference Tables¶
This appendix holds the long reference material for Chapter 1. The chapter itself should teach in sequence. This appendix should be used when the reader needs to look up a term, tool, package, convention, or beginner trap without interrupting the main argument.
Reference Index¶
- Computer Basics
- Python Language
- Tools Environment and Infrastructure
- Project Structure and Dependencies
- Version Control
- APIs Data Formats and Networking
- Data Science and AI/ML Vocabulary
- Key Python Packages
- Coding Conventions and Beginner Traps
0 - Computer Basics¶
Before you write a single line of code, you need to understand the machine you're working on. This section translates the everyday computing jargon that experienced programmers take for granted.
| Term | What | Why / How |
|---|---|---|
| Computer / PC | A programmable electronic device that stores, retrieves, and processes data. "PC" historically meant IBM-compatible personal computers running Windows, but today it's used loosely for any personal computer (including Macs). | Your laptop is a PC. It has a processor (CPU) that executes instructions, memory (RAM) that holds data while the machine is on, and storage (SSD/hard drive) that keeps data permanently. |
| Hardware | The physical components you can touch: the screen, keyboard, processor chip, memory sticks, battery, SSD. | Software tells hardware what to do. You don't need to understand electronics, but knowing that your CPU speed and RAM size affect performance helps when things feel slow. |
| Software | Programs — sets of instructions that tell hardware what to do. Includes the operating system, apps, and your Python scripts. | Every line of Python you write is software. Software is stored on disk and loaded into RAM when you run it. |
| CPU (Central Processing Unit) | The "brain" of the computer — a chip that executes billions of simple instructions per second. | When your Python code runs, the CPU is doing the actual math and logic. Multi-core CPUs can run multiple tasks in parallel. |
| RAM (Random Access Memory) | Fast, temporary memory where the computer keeps data it's actively using. Erased when you shut down. | When you open VS Code, Python, and Chrome simultaneously, they all live in RAM. More RAM = more programs running smoothly. Typical: 8–32 GB. |
| Storage (SSD / Hard Drive) | Permanent memory — your files, photos, programs, and documents survive a reboot here. An SSD (Solid State Drive) is faster than an older spinning HDD (Hard Disk Drive). | Your Python files, datasets, and installed packages are stored here. SSDs make everything load faster. Typical: 256 GB – 2 TB. |
| GPU (Graphics Processing Unit) | A chip designed for massively parallel math — originally for rendering graphics, now essential for training neural networks. | Deep learning (Chapter 14+) uses GPUs to train models 10–100× faster than a CPU alone. Chapter 14 is where you first check for and compute on a GPU. NVIDIA + CUDA is the standard stack in AI/ML. |
| Operating System (OS) | The master software that manages all hardware and runs all other programs. It's the first thing that loads when you turn on your computer. | The three main OSes: Windows (Microsoft), macOS (Apple), and Linux (open-source, used on most servers and in AI research). This course works on all three, but examples use Windows. |
| Windows | Microsoft's operating system, the most widely used desktop OS. Current version: Windows 11. | If your laptop came from a store and isn't a Mac, it almost certainly runs Windows. Key shortcuts: Win+E (File Explorer), Win+R (Run), Ctrl+C/V (copy/paste). |
| macOS | Apple's operating system for Mac computers. Built on Unix (like Linux). | If you have a MacBook, you're on macOS. The terminal uses zsh (a shell similar to Bash). Most Python tools work identically on macOS. |
| Linux | A free, open-source operating system family (Ubuntu, Fedora, Debian, etc.). Dominates servers, cloud, and AI infrastructure. | Most AI models are trained on Linux servers. You'll encounter Linux when you deploy code to the cloud. The Windows Subsystem for Linux (WSL) lets you run Linux inside Windows. |
| GUI (Graphical User Interface) | The visual, point-and-click interface — windows, icons, menus, buttons. Pronounced "gooey." | When you drag a file to the trash or click a button, you're using the GUI. Most people interact with computers exclusively through GUIs. |
| CLI (Command Line Interface) | A text-based interface where you type commands and read text output. Also called the terminal, console, or command prompt. | Programmers use the CLI because it's faster, scriptable, and more powerful than clicking through menus. You'll use it to install packages, run scripts, and manage files. |
| Desktop | (1) The main screen you see after logging in, with icons and a taskbar. (2) A folder (C:\Users\YourName\Desktop) where those icons live. |
When someone says "save it to the desktop," they mean the Desktop folder. When they say "the desktop environment," they mean the entire visual workspace. |
| Taskbar / Dock | The bar at the bottom (Windows) or bottom/side (Mac) of the screen showing running apps and pinned shortcuts. | Right-click the taskbar to access Task Manager (Windows) — useful when a program freezes. |
| File | A named unit of data stored on disk: a document, photo, program, script, or dataset. | Every Python script (.py), notebook (.ipynb), and dataset (.csv) is a file. Files have a name and an extension (the part after the dot). |
| File Extension | The suffix after the dot in a filename that indicates the file type: .py (Python), .ipynb (notebook), .txt (text), .csv (data), .json (structured data), .exe (Windows program). |
Your OS uses extensions to decide which program opens a file. If you can't see extensions, turn them on: File Explorer → View → Show → File name extensions. |
| Folder / Directory | A container that organizes files on disk. "Folder" is the GUI term; "directory" is the technical/CLI term — they mean the same thing. | Your files live in directories. A directory can contain files and other directories (subdirectories), forming a tree structure. |
| Path | The address of a file or folder in the directory tree. Windows uses backslashes: C:\Users\YourName\Documents\project\main.py. Mac/Linux use forward slashes: /home/yourname/project/main.py. |
Every file has a unique absolute path (from the root) and a relative path (from your current location). Paths are how you tell Python where to find things. |
| Root Directory | The top-level directory of a drive. On Windows: C:\. On Mac/Linux: /. |
Every absolute path starts from the root. C:\Users means "the Users folder directly inside the C: drive root." |
| Home Directory | Your personal folder: C:\Users\YourName (Windows) or /home/yourname (Linux) or /Users/yourname (Mac). The ~ symbol is a shortcut for it. |
Most of your work lives here. When a tutorial says "in your home directory," it means this folder. |
| Application / App / Program | A software program you run: Chrome (browser), VS Code (editor), Python (interpreter), Spotify (music). | Apps are installed on your storage and loaded into RAM when you launch them. On Windows, they often live in C:\Program Files\. |
| Process | A running instance of a program. Opening Chrome twice creates two processes. | Task Manager (Windows: Ctrl+Shift+Esc) shows all running processes. If Python is stuck, you can kill its process there. |
| Install / Uninstall | Copying a program's files to your computer (install) or removing them (uninstall). | You'll install Python, VS Code, and packages. On Windows: Settings → Apps. With Python packages: pip install numpy. |
| Network | Two or more computers connected to share data. Your home Wi-Fi connects your devices in a LAN (Local Area Network). | Networking enables everything online: web browsing, API calls, Git push/pull, downloading datasets. |
| Internet | The global network of networks — billions of devices connected by routers, cables, and wireless signals. | Every time you pip install a package, download a dataset, or call an API, your computer reaches out over the internet. |
| IP Address | A unique numerical address identifying a device on a network: 192.168.1.5 (local) or 142.250.80.46 (Google). 127.0.0.1 (or localhost) always means "this computer." |
When you run a local web server (python -m http.server), it listens on localhost. You'll see IP addresses in Docker, cloud deployment, and network debugging. |
| URL (Uniform Resource Locator) | A web address: https://github.com/python/cpython. Combines protocol (https), domain (github.com), and path (/python/cpython). |
URLs are how you find web pages, API endpoints, Git repos, and downloadable files. |
| Browser | An app that fetches and displays web pages: Chrome, Edge, Firefox, Safari. | You'll view documentation, Stack Overflow answers, and your own web apps in a browser. |
| Download / Upload | Download: copy data from the internet to your computer. Upload: copy data from your computer to the internet. | Downloading Python from python.org, uploading code to GitHub — these are the two directions of internet file transfer. |
| Cloud | Computers owned by companies (Microsoft Azure, Amazon AWS, Google Cloud) that you rent over the internet instead of buying your own servers. | AI models are often trained on powerful cloud machines with GPUs. "Deploy to the cloud" means putting your app on someone else's servers so the world can use it. |
| Server | A computer (or program) that provides services to other computers (clients). A web server serves web pages; a file server stores files. | When you visit a website, your browser (client) sends a request to a server, which sends back the page. Your own laptop can run a local server for development. |
| Shell | A program that interprets the commands you type in the terminal. The shell is the language; the terminal is the window. | Different shells understand slightly different commands. Think of it like dialects of the same language. |
| PowerShell | Windows' modern shell. Commands are called cmdlets: Get-ChildItem (list files), Set-Location (change directory). Also understands classic commands like cd and dir. |
If you open VS Code's terminal on Windows, you're usually in PowerShell. It's more powerful than the old Command Prompt (cmd). |
| Bash (Bourne Again Shell) | The default shell on most Linux distributions and older macOS. Commands: ls (list files), cd (change directory), cat (display file). |
Most online tutorials assume Bash. If you're on Windows, Git Bash or WSL gives you a Bash environment. macOS now defaults to zsh, which is very similar. |
Command Prompt (cmd) |
Windows' older, simpler CLI. Still works but less powerful than PowerShell. | You'll occasionally see cmd in legacy tutorials. For new work, use PowerShell or Git Bash instead. |
| Environment Variable | A named value stored by the OS that programs can read. Examples: PATH (where to find executables), HOME (your home directory), API_KEY (a secret). |
When a tutorial says "set an environment variable," it means telling the OS to remember a value that your programs can look up. In Python: os.environ["VAR_NAME"]. |
| PATH | A special environment variable listing directories where the OS searches for executables. When you type python, the OS checks each PATH directory until it finds python.exe. |
If you get 'python' is not recognized, Python's directory isn't in your PATH. Installers usually add it for you (check "Add to PATH" during install). |
| Clipboard | An invisible temporary storage area for copy/paste. Ctrl+C copies to clipboard; Ctrl+V pastes from it. |
You'll copy-paste code, error messages, and file paths constantly. This is perhaps the most-used feature in computing. |
| Shortcut / Hotkey | A keyboard combination that triggers an action: Ctrl+S (save), Ctrl+Z (undo), Alt+Tab (switch windows), Ctrl+Shift+P (VS Code command palette). |
Learning shortcuts is the fastest way to speed up your workflow. Each app has its own set. |
| Administrator / Admin / Root | A user account with full control over the system — can install software, change settings, and access all files. | Some installations require "Run as Administrator" (Windows) or sudo (Mac/Linux). Be careful with admin commands — they can modify or delete system files. |
| Reboot / Restart | Shutting down and turning the computer back on. Clears RAM, resets processes, and applies updates. | "Have you tried turning it off and on again?" is a real fix — rebooting clears stuck processes and corrupted state. |
A - Python Language¶
For the full technical instruction manual, use the Official Python Documentation: Full Table of Contents. The chapter teaches the learning sequence; the official documentation is the authoritative reference when you want the exact language rules, library modules, and technical details.
For strings specifically, use the official Python documentation for str, the text sequence type.
For lists and list methods, use Python's tutorial section More on Lists.
For control flow tools, use Python's tutorial section More Control Flow Tools.
For function definitions, defaults, keyword arguments, lambdas, and annotations, use Python's tutorial anchors for Defining Functions, Default Argument Values, Keyword Arguments, Lambda Expressions, and Function Annotations.
For core containers, comprehensions, tuples, sets, dictionaries, and looping idioms, use Python's tutorial section Data Structures. For file examples, use Reading and Writing Files, pathlib, and collections.deque.
For modules, packages, import behavior, and the standard library, use Python's tutorial section Modules, the Python Standard Library, math, and os.
For errors and exceptions, use Python's tutorial section Errors and Exceptions. For classes, iterators, and generators, use Classes, dataclasses, and itertools.
For professional style and debugging vocabulary, use PEP 8 and the Python tutorial's error-handling material. For regular expressions, use the re module documentation.
For scientific Python, use NumPy's absolute beginner guide, the NumPy ndarray reference, Pandas 10 minutes to pandas, and the Pandas DataFrame reference.
For the first machine-learning pipeline, use scikit-learn's Pipeline, load_breast_cancer, and model evaluation guide.
| Term | What | Why / How |
|---|---|---|
| Python | A high-level, interpreted programming language created by Guido van Rossum (1991). | Its clean syntax and vast ecosystem make it the dominant language for data science, AI/ML, web back-ends, and scripting. You already have it if you installed VS Code's Python extension — otherwise download from python.org. |
| Interpreter | The program that reads your Python code and executes it line by line (as opposed to a compiler, which translates everything up front). | This is why Python is called "interpreted." The interpreter is the python (or python3) executable. When you run a notebook cell, the kernel sends your code to the interpreter. |
| PEP (Python Enhancement Proposal) | A design document describing a new Python feature or convention. Each has a number: PEP 8 (style guide), PEP 20 (Zen of Python), PEP 621 (project metadata). | When someone says "that's not PEP 8," they mean the code doesn't follow the official style guide. PEPs are the governing documents of Python's evolution. |
| Indentation | Whitespace at the start of a line that defines code blocks. Python uses indentation instead of braces {} to group statements under if, for, def, class, etc. |
The standard is 4 spaces per level (never tabs). Inconsistent indentation causes IndentationError. Configure your editor to insert spaces when you press Tab. (§4) |
| Variable | A name that refers to a value stored in memory (x = 42). |
Variables let you reuse computed results, label data, and build up complex logic. Python is dynamically typed — you don't declare the type; the interpreter figures it out. |
| Assignment | Binding a name to a value with the = operator: x = 42. The right side is evaluated first, then the result is stored. |
= is not math equality — it means "put this value into this name." Use == for comparison. Confusing = and == is the most common beginner bug. (§1, §4) |
| Operator | A symbol that performs an operation on values. Arithmetic: +, -, *, /, // (floor division), % (modulo), ** (power). Comparison: ==, !=, <, >, <=, >=. Logical: and, or, not. Membership: in, not in. |
Operator precedence matters: ** before *// before +/-. Use parentheses when in doubt. (§1, §4, §15) |
| Type / Data Type | The kind of value a variable holds: int (integer), float (decimal), str (text), bool (True/False), list, dict, etc. |
Every operation depends on type — you can add two numbers but not a number and a string. type(x) tells you what you're working with. |
Boolean (bool) |
A type with exactly two values: True and False. Result of comparisons and logical operations. bool is a subclass of int (True == 1, False == 0). |
Booleans drive if statements, while loops, and filtering. Falsy values: 0, 0.0, "", [], {}, None. Everything else is truthy. (§4) |
Floating-Point (float) |
A decimal number stored in binary (IEEE 754). Includes 3.14, -0.001, 1e10. |
⚠ Floats are approximate: 0.1 + 0.2 != 0.3 due to binary representation. Use math.isclose() for comparisons or decimal.Decimal for exact arithmetic. (§10) |
String (str) |
An immutable sequence of characters, enclosed in quotes: 'hello', "hello", or """multi-line""". |
Strings support indexing (s[0]), slicing (s[1:4]), concatenation (+), repetition (*), and dozens of methods (.upper(), .strip(), .split()). Immutable means you build new strings rather than modifying existing ones. (§2) |
| List | An ordered, mutable sequence of items: [1, 'hello', 3.14]. The most versatile Python collection. |
Lists support indexing, slicing, .append(), .pop(), .sort(), and comprehensions. Because they're mutable, assignment (b = a) creates an alias, not a copy — a major beginner trap. (§3) |
Dictionary (dict) |
A collection of key→value pairs: {'name': 'Alice', 'age': 28}. Keys must be immutable and unique. |
The go-to structure for labeled data, configuration, and JSON-like structures. Lookup by key is O(1) (instant). Use d.get(key) to avoid KeyError on missing keys. (§6) |
| Tuple | An immutable sequence, typically for heterogeneous fixed-size data: (x, y), ('Alice', 28, 'NYC'). Created by commas (parentheses optional). |
Use tuples for coordinates, function return values, and dictionary keys. Packing: t = 1, 2, 3. Unpacking: a, b, c = t. (§6) |
| Set | An unordered collection of unique, hashable elements: {1, 2, 3}. |
Fast membership testing (x in s is O(1)), plus mathematical set operations: union |, intersection &, difference -, symmetric difference ^. ⚠ Empty set is set(), not {} (that's an empty dict). (§6) |
| Index / Indexing | Accessing a single element by its position: s[0] (first), s[-1] (last). Positions are 0-based — the first element is index 0, not 1. |
Works on strings, lists, tuples, and any sequence. Negative indices count from the end. IndexError means you went past the end. (§2, §3) |
| Slice / Slicing | Extracting a sub-sequence with [start:stop:step]. Start is included, stop is excluded. |
s[1:4] → elements at indices 1, 2, 3. Omit start (s[:3]) to begin at 0; omit stop (s[2:]) to go to the end. s[::2] takes every other element. Returns a new object. (§2, §3) |
| Expression | A piece of code that produces a value (3 + 4, len("hello"), x > 0). |
Expressions are the building blocks you put inside print(), if conditions, list comprehensions, etc. |
| Statement | A complete instruction that does something (x = 5, if …:, for …:, import …). |
Statements are the lines of your program. An expression can be a statement, but not all statements are expressions. |
Conditional (if / elif / else) |
Branching control flow: execute different blocks depending on whether conditions are True or False. |
elif is short for "else if" and avoids excessive nesting. An if/elif chain is Python's replacement for switch/case (see also match). (§4) |
Loop (for / while) |
Repeating a block of code. for x in iterable: iterates over items; while condition: repeats until the condition is False. |
Python's for loop iterates over items directly (not a counter like C). Use break to exit early, continue to skip to the next iteration, and pass as a no-op placeholder. (§4) |
range() |
A built-in that generates an arithmetic sequence of integers: range(5) → 0, 1, 2, 3, 4. |
range(start, stop, step). The stop value is never included (half-open interval). range is lazy — it doesn't create the full list in memory. (§4) |
enumerate() |
A built-in that yields (index, value) pairs during iteration: for i, v in enumerate(items):. |
The Pythonic way to get both the index and the value. Avoids the anti-pattern for i in range(len(items)). (§4) |
zip() |
A built-in that pairs elements from two or more iterables in parallel: zip(names, scores) → ('Alice', 95), ('Bob', 87), … |
Stops at the shortest input. Used constantly for parallel iteration and for creating dicts: dict(zip(keys, values)). (§6) |
match / Pattern Matching |
Structural pattern matching (Python 3.10+): match value: case pattern: …. More powerful than switch/case — supports destructuring, guards, and variable capture. |
Useful for parsing commands, processing structured data, and replacing long if/elif chains. The _ pattern is the wildcard (default case). (§4) |
| Function | A reusable block of code defined with def, called by name with arguments: def greet(name): … |
Functions eliminate repetition, make code testable, and let you think in terms of high-level operations ("clean the data," "train the model"). |
| Method | A function that belongs to an object, called with dot notation: "hello".upper(), my_list.append(42). |
Every Python type comes with methods — they are the object's built-in toolbox. |
| Lambda | A small anonymous (unnamed) function written as a single expression: lambda x: x ** 2. |
Most useful as a key= argument to sorted(), max(), min(), or filter(). If the logic is complex, use a regular def instead. (§5) |
| Class | A blueprint for creating objects that bundle data (attributes) and behavior (methods). | OOP (Object-Oriented Programming) organizes complex systems. class Dog: … lets you create many Dog instances, each with its own name and tricks. |
| Object / Instance | A concrete thing created from a class. fido = Dog("Fido") — fido is an instance of Dog. |
In Python, everything is an object — even numbers, strings, and functions. |
self |
The first parameter of every instance method, referring to the specific object the method was called on. | When you call d.add_trick('roll'), Python translates it to Dog.add_trick(d, 'roll') — self is d. It's a convention (not a keyword), but always name it self. (§9) |
| Dunder / Magic Method | Special methods with double underscores: __init__ (constructor), __repr__ (string representation), __len__, __add__, etc. |
These let your classes integrate with Python's syntax: len(obj) calls obj.__len__(), print(obj) calls obj.__repr__(). Also called "special methods." (§9) |
| Inheritance | Deriving a child class from a parent class: class Cat(Animal):. The child inherits all methods and attributes, and can add or override them. |
Avoids duplicating code across similar classes (DRY). Enables polymorphism — different classes responding differently to the same method call. (§9) |
| Polymorphism | The ability for different object types to be used interchangeably through a shared interface (e.g., calling .speak() on any Animal subclass). |
Python uses "duck typing" — if it walks like a duck and quacks like a duck, it IS a duck. You don't need to declare interfaces; just implement the expected methods. (§9) |
super() |
Calls the parent class's method from inside a child class: super().__init__(name). |
Avoids hardcoding the parent class name — works correctly even with complex inheritance chains. Always use super() instead of ParentClass.method(self). (§9) |
@dataclass |
A decorator (from dataclasses) that auto-generates __init__, __repr__, __eq__, and more from type-annotated class attributes. |
Eliminates boilerplate: @dataclass class Point: x: float; y: float gives you a complete class in two lines. (§9) |
| Attribute | A value attached to an object, accessed with a dot: fido.name, np.pi. |
Attributes are how objects carry their data around. |
| Argument / Parameter | A value you pass into a function: print("hello") — "hello" is an argument. Parameter is the name in the def line; argument is the value at the call site. |
Understanding arguments is essential for calling any function or API correctly. |
| Keyword Argument | An argument passed by name: print("hello", end=" "). |
Keyword arguments make function calls self-documenting and let you skip optional parameters. |
*args / ****kwargs** |
Special syntax for functions that accept any number of positional (*args) or keyword (**kwargs) arguments. |
Used heavily in decorators, wrapper functions, and library APIs. You will see them in frameworks like Flask, FastAPI, and PyTorch. |
| Unpacking | Assigning elements of an iterable to multiple variables: a, b, c = [1, 2, 3]. The * operator collects remainders: first, *rest = [1, 2, 3, 4]. |
Also works in function calls: f(*my_list) unpacks a list into positional args; f(**my_dict) unpacks a dict into keyword args. (§5, §6) |
| Return Value | The result a function sends back via return. If omitted, the function returns None. |
Every function that computes something useful should return a value so the caller can use it. |
| Scope | Where a name (variable) is visible. Python uses the LEGB rule: Local → Enclosing → Global → Built-in. | Understanding scope prevents bugs like accidentally overwriting a variable or getting a NameError. |
| Namespace | A mapping from names to objects. Each module, function, and class has its own namespace. | Namespaces prevent naming collisions: math.sqrt and cmath.sqrt coexist because they live in different namespaces. import math gives you the math namespace. (§7) |
| Standard Library | Python's built-in collection of ~300 modules available without pip install: math, os, re, json, collections, datetime, pathlib, etc. |
"Batteries included" — before reaching for PyPI, check if the standard library already has what you need. import module_name is all it takes. (§7) |
| Mutable / Immutable | Mutable objects (lists, dicts, sets) can be changed after creation. Immutable objects (ints, strings, tuples) cannot. | This distinction affects copying, function arguments, and whether something can be a dictionary key. |
| Hashable | An object with a fixed hash value (computed by __hash__()) that never changes during its lifetime. All immutable built-in types are hashable. |
Only hashable objects can be dictionary keys or set elements. Lists and dicts are NOT hashable (they're mutable). Tuples are hashable only if all their elements are. (§6) |
| Aliasing | When two or more variable names refer to the same object in memory: b = a for a list makes b an alias, not a copy. |
Modifying through one name affects the other. Use .copy(), [:], or list() for independent copies. This is the #1 list trap for beginners. (§3) |
| Iterable | Any object you can loop over with for: lists, strings, dicts, files, generators, ranges. |
Python's for loop works on iterables, not just number ranges — a key difference from C/Java. |
| Iterator | An object that produces one value at a time via __next__(). Created from an iterable by iter(). |
Iterators enable lazy evaluation — processing data one piece at a time without loading it all into memory. |
| Generator | A function that uses yield instead of return, producing values lazily one at a time. |
Generators are memory-efficient iterators. Crucial for streaming large datasets in ML pipelines. |
| Comprehension | A concise one-line syntax for building lists, dicts, or sets: [x**2 for x in range(10)]. |
Comprehensions are Pythonic — cleaner and faster than explicit loops for simple transformations. |
| Decorator | A function that wraps another function to modify its behavior, applied with @: @dataclass. |
You'll encounter @property, @staticmethod, @app.route (Flask), @torch.no_grad() (PyTorch), etc. |
| Docstring | A triple-quoted string at the top of a function/class/module that documents what it does. Accessed via help() or .__doc__. |
Good docstrings make your code usable by others (and by your future self). |
| Type Hint / Annotation | Optional notation showing expected types: def greet(name: str) -> str: |
Type hints enable better autocompletion (IntelliSense), catch bugs earlier, and serve as living documentation. |
| Exception | An error detected during execution (ValueError, TypeError, KeyError, etc.). Handled with try/except. |
Exceptions are how Python reports problems. Learning to read tracebacks is the fastest path to fixing bugs. |
| Traceback | The error report Python prints when an unhandled exception occurs, showing the chain of function calls leading to the error. | Read from the bottom up: the last line is the error type and message, the lines above show where it happened. |
try / except / else / finally |
The full exception-handling structure. try: wraps risky code, except: catches errors, else: runs if no error, finally: always runs (cleanup). |
except SpecificError as e: catches only that error type. Bare except: catches everything (discouraged). Use raise to re-raise or trigger exceptions. (§8) |
| Context Manager | An object used with with that automatically handles setup and cleanup (e.g., opening/closing files). |
with open("file.txt") as f: guarantees the file is closed even if an error occurs. |
| f-string | A string prefixed with f that embeds expressions inside {}: f"Hello, {name}". |
The most readable way to build strings with variables. Supports format specifiers like :.2f. |
| Raw String | A string prefixed with r that treats backslashes as literal characters: r"C:\new" keeps \n as two characters, not a newline. |
Essential for regex patterns (r'\d+') and Windows file paths. Without r, Python interprets \n, \t, etc. as escape sequences. (§2, §11) |
| Regex / Regular Expression | A pattern language for matching and extracting text: r'\d{3}-\d{3}-\d{4}' matches phone numbers. |
Essential for data cleaning, validation, and NLP pre-processing. Python provides the re module. |
| Serialization | Converting an object to a storable/transmittable format (JSON, CSV, pickle) and back. | Every time you save data to a file or send it over a network, serialization is involved. |
B - Tools Environment and Infrastructure¶
| Term | What | Why / How |
|---|---|---|
| VS Code (Visual Studio Code) | A free, open-source code editor by Microsoft with extensions for Python, Jupyter, Git, and much more. | The recommended editor for this course. Download from code.visualstudio.com. Not to be confused with the full Visual Studio IDE — VS Code is lightweight and cross-platform. |
| Extension (VS Code) | A plugin that adds functionality to VS Code (Python support, Jupyter, linting, themes). | Install via the Extensions sidebar (Ctrl+Shift+X). Key extensions: ms-python.python, ms-toolsai.jupyter, ms-python.black-formatter. |
| Command Palette | VS Code's universal command search: press Ctrl+Shift+P (or F1) and type any command name. |
The fastest way to access any VS Code action — changing settings, running tasks, opening files, switching themes. "When in doubt, palette it out." |
| Workspace | A VS Code concept: a folder (or set of folders) you open together, with shared settings in .vscode/settings.json. |
Opening a folder in VS Code creates a workspace. Multi-root workspaces combine multiple project folders in one window. |
Jupyter Notebook (.ipynb) |
An interactive document mixing executable code cells, rich text (Markdown), and output (plots, tables). The name stands for Julia + Python + R. | Notebooks are the standard medium for data exploration, teaching, and prototyping in AI/ML. VS Code has built-in support via the Jupyter extension. Originally from jupyter.org. |
| Cell | The smallest editable unit in a notebook — either a code cell (Python) or a Markdown cell (formatted text). | You run cells individually or in sequence. Each code cell can display output directly below it. |
| Kernel | The background Python process that executes code cells in a notebook. | If your code hangs or produces stale results, restarting the kernel clears all variables and starts fresh. |
| Terminal / Command Line / Shell | A text interface where you type commands (python, pip install, git commit). VS Code has one built in (`Ctrl+``). |
Many operations (installing packages, running scripts, using Git) happen in the terminal. On Windows, VS Code defaults to PowerShell. |
| PowerShell | The default terminal shell on Windows. Uses cmdlets like Get-ChildItem but also runs standard commands like python and pip. |
If a tutorial says "open a terminal," you can use VS Code's integrated terminal, which typically opens PowerShell on Windows. |
| IDE (Integrated Development Environment) | A software application that combines a code editor, terminal, debugger, and project tools in one window. | VS Code is technically an editor enhanced into a near-IDE by extensions. Full IDEs include PyCharm and Visual Studio. |
| IntelliSense | VS Code's autocompletion and code intelligence system: suggests methods, parameters, and types as you type. | Powered by the Pylance extension for Python. Saves time and prevents typos. |
| Linting | Automatically checking your code for style violations, potential bugs, and errors before running it. | Linters like Ruff or Pylint underline problems in your editor. Think of it as a spell-checker for code. |
| Formatter | A tool that automatically reformats your code to follow style conventions (indentation, spacing, line length). | Black is the most popular Python formatter — it enforces a consistent style so you never argue about formatting. |
| Debugger | A tool that lets you pause your program, inspect variables, and step through code one line at a time. | VS Code has a built-in debugger. Set a breakpoint (click the gutter) and press F5 to start debugging. |
| Breakpoint | A marker on a line of code that tells the debugger to pause execution there. | Breakpoints let you examine the state of your program at a specific moment, which is far more effective than sprinkling print() everywhere. |
| REPL | Read-Eval-Print Loop — an interactive prompt where you type one expression, Python evaluates it, and prints the result. | The Python interactive shell (>>>) is a REPL. Notebook cells behave like a REPL with memory. |
C - Project Structure and Dependencies¶
| Term | What | Why / How |
|---|---|---|
| Package (Python) | (1) A directory containing __init__.py that can be imported. (2) A distributable bundle of code installed via pip (e.g., numpy, pandas). |
Meaning depends on context — a "package" you import is a folder in your project; a "package" you pip install is a distribution from PyPI. |
| Module | A single .py file that can be imported. import math loads the math module. |
Modules are how Python organizes code into reusable files. Your own .py files are modules too. |
| Library | An informal term for a collection of modules/packages that solve a specific problem domain (e.g., "the NumPy library"). | There's no strict technical distinction between "library" and "package" — people use them interchangeably. |
pip |
The default Python package installer. pip install numpy downloads and installs a package. |
Comes bundled with Python. Fetches packages from PyPI by default. |
| PyPI (Python Package Index) | The central repository where 500,000+ Python packages are published. URL: pypi.org. | When you run pip install something, pip downloads it from PyPI. Anyone can publish packages here. |
uv |
A fast, modern Python package and project manager (written in Rust), replacing pip + venv + pip-compile. |
10-100× faster than pip. Install: pip install uv or see docs.astral.sh/uv. Used in this workspace for venv creation. |
Virtual Environment (.venv) |
An isolated directory containing a Python interpreter and installed packages, separate from your system Python. | Why: Project A might need numpy 1.26 while Project B needs numpy 2.0. Without venvs, these conflict. Each project gets its own .venv/ folder. Create with python -m venv .venv or uv venv .venv. |
requirements.txt |
A text file listing every package (and version) your project needs: numpy==1.26.4. |
Share this file so others can reproduce your exact environment: pip install -r requirements.txt. |
pyproject.toml |
The modern standard (PEP 621) for Python project metadata: name, version, dependencies, tool settings — all in one file. | Replaces the older setup.py + setup.cfg + requirements.txt trio. Used by uv, pip, build, and most modern tools. |
| Dependency | A package your project requires to run (e.g., your code depends on pandas). |
Managing dependencies — which versions work together — is one of the hardest problems in software. That's why venvs and lock files exist. |
| Lock File | A file that pins the exact version of every dependency (including sub-dependencies): uv.lock, requirements.txt with == versions. |
Ensures everyone on the team gets identical packages. Without it, "works on my machine" bugs creep in. |
.env |
A file containing environment variables (secrets, config) in KEY=VALUE format. |
Never commit this to Git. It stores API keys, database passwords, and tokens that vary per machine. Loaded by python-dotenv. |
config.json / config.yaml |
Non-secret application settings (model names, thresholds, log levels) stored in a structured file. | Unlike .env, these can be committed to Git because they contain no secrets. |
.gitignore |
A file telling Git which files/folders to exclude from version control. | Prevents committing .venv/, .env, __pycache__/, and other generated/secret files. |
__init__.py |
A (possibly empty) file that marks a directory as a Python package so it can be imported. | Without it, import my_package would fail. It can also define a package's public API. |
__main__.py |
A file that makes a package runnable as a script: python -m my_package. |
Provides a convenient entry point without the user needing to know which specific .py file to run. |
__pycache__/ |
A directory where Python stores compiled bytecode (.pyc files) to speed up subsequent imports. |
Automatically generated — safe to delete and always gitignored. |
__name__ |
A special variable: equals "__main__" when a file is run directly, or the module name when imported. |
The if __name__ == "__main__": guard lets a file work both as a script and as an importable module. |
D - Version Control¶
| Term | What | Why / How |
|---|---|---|
| Git | A distributed version control system that tracks changes to your files over time. | Lets you undo mistakes, work on features in parallel (branches), and collaborate. Download from git-scm.com. VS Code has built-in Git support. |
| Repository (Repo) | A project folder tracked by Git, containing all files plus the hidden .git/ history. |
Created with git init or cloned from a remote with git clone. |
| Commit | A snapshot of your project at a point in time, with a message describing what changed. | git commit -m "Add data loader" saves the current state. You can always go back to any commit. |
| Branch | A parallel line of development. The default branch is usually called main. |
Branches let you experiment without affecting the stable code. Merge back when ready. |
| GitHub | A cloud hosting service for Git repositories, with collaboration features (pull requests, issues, actions). URL: github.com. | The most popular platform for open-source and team projects. Free for public and small private repos. |
| Pull Request (PR) | A GitHub feature for proposing changes: you push a branch and ask others to review before merging. | PRs are the standard code review workflow. They catch bugs and share knowledge. |
| Source Control | The general practice (and VS Code sidebar panel) of tracking file changes with a system like Git. | Click the Source Control icon in VS Code (Ctrl+Shift+G) to see changes, stage files, and commit. |
| Clone | Copying a remote repository to your local machine: git clone https://github.com/user/repo.git. |
The first step when joining an existing project. |
E - APIs Data Formats and Networking¶
| Term | What | Why / How |
|---|---|---|
| API (Application Programming Interface) | A defined set of rules for how software components communicate. In practice, usually a web service you send requests to and receive structured data back. | Example: send a query to the PubMed API, get back article data as JSON. APIs are how programs talk to databases, web services, and AI models. |
| REST API | An API design style using standard HTTP methods (GET, POST, PUT, DELETE) and URLs. |
Most web APIs (GitHub, Twitter, OpenAI) are REST APIs. You'll use Python's requests library to call them. |
| HTTP | HyperText Transfer Protocol — the foundation of web communication. | Every time your browser loads a page or your code calls an API, it's using HTTP. Status codes: 200 = OK, 404 = Not Found, 500 = Server Error. |
| JSON (JavaScript Object Notation) | A lightweight text format for structured data: {"name": "Alice", "age": 28}. |
The universal data exchange format for APIs. Python's json module and pandas' read_json() handle it natively. |
| CSV (Comma-Separated Values) | A plain text file where each line is a row and columns are separated by commas. | The simplest tabular data format. pandas.read_csv() is probably the most-used function in data science. |
| TOML | Tom's Obvious Minimal Language — a configuration file format used by pyproject.toml. |
Human-readable, less error-prone than YAML, and now Python's standard for project metadata. |
| YAML | YAML Ain't Markup Language — a human-friendly configuration format (indentation-based). | Used in Docker Compose, GitHub Actions, Kubernetes, and many config files. |
| Markdown | A lightweight markup language for formatted text: **bold**, # Heading, `code`. |
Used in README files, Jupyter markdown cells, GitHub issues, and this glossary. |
| $\LaTeX$ (LaTeX) | A typesetting system for mathematical notation: $E = mc^2$ renders as $E = mc^2$. |
Jupyter markdown cells support LaTeX for equations. This notebook uses it extensively. |
| URL | Uniform Resource Locator — a web address: https://pypi.org/project/numpy/. |
URLs identify web pages, API endpoints, and downloadable resources. |
| Token / API Key | A secret string that authenticates your requests to an API. | Treat like a password — store in .env, never commit to Git. Example: OpenAI key sk-abc123…. |
F - Data Science and AIML Vocabulary¶
| Term | What | Why / How |
|:-----|:-----|:----------|
| EDA (Exploratory Data Analysis) | The process of summarizing, visualizing, and understanding a dataset before modeling. | Always the first step. Use df.describe(), df.info(), histograms, and scatter plots. |
| Array / ndarray | NumPy's core data structure: a fixed-type, n-dimensional grid of numbers. Unlike Python lists, all elements must be the same type (int64, float64, etc.). | Arrays enable vectorization — performing operations on entire arrays at once instead of looping element by element. Created with np.array(), np.zeros(), np.arange(), etc. (§12) |
| DataFrame | A 2D labeled table (rows + columns) — the core object in Pandas. | Think of it as a spreadsheet in memory. Most data in ML workflows lives in a DataFrame. |
| Series | A labeled 1D array — a single column of a DataFrame. Selecting df["Score"] returns a Series. | Each Series has an index (row labels) and a dtype (data type). A DataFrame is essentially a dictionary of Series that share the same index. (§13) |
| Shape | The dimensions of an array or DataFrame, given as a tuple: (rows, columns) for 2D, (depth, rows, columns) for 3D. | X.shape[0] = number of rows (samples), X.shape[1] = number of columns (features). Always check .shape when debugging data pipelines. (§12, §14) |
| Axis | The dimension along which an operation is performed. In a 2D array: axis=0 operates down the rows (collapsing rows), axis=1 operates across the columns (collapsing columns). | Think: "which dimension gets eliminated?" axis=0 eliminates rows → one value per column. axis=1 eliminates columns → one value per row. (§12) |
| Broadcasting | NumPy's rule for performing operations on arrays of different shapes by automatically expanding the smaller one. | Example: array + 5 adds 5 to every element; matrix * [1, 2, 3] multiplies each column by a different value. Broadcasting avoids explicit loops and copies. (§12) |
| Boolean Indexing / Masking | Selecting array or DataFrame elements using a True/False mask: arr[arr > 5] returns only elements greater than 5. | Critical for data filtering: df[df["Age"] > 30] returns rows where Age exceeds 30. The mask is just an array of booleans with the same shape. (§12, §13) |
| Feature | A measurable property of the data used as input to a model (a column in your DataFrame). | Good features → good models. Feature engineering is the art of creating useful columns. |
| Label / Target | The value you're trying to predict (the y column). | In classification: "malignant" vs "benign." In regression: a continuous number like price. |
| Feature Scaling / Normalization | Transforming features to a common range (e.g., [0, 1] via MinMaxScaler or zero-mean/unit-variance via StandardScaler). | Many algorithms (SVM, KNN, neural networks) are sensitive to feature magnitudes — a feature in the range [0, 1000] would dominate one in [0, 1]. Scaling fixes this. (§14) |
| Train/Test Split | Dividing data into a training set (to fit the model) and a test set (to evaluate it). | Prevents overfitting — a model that memorizes training data but fails on new data. |
| Stratified Sampling | Splitting data so that each subset preserves the original class proportions: train_test_split(X, y, stratify=y). | Crucial when classes are imbalanced (e.g., 90% benign, 10% malignant). Without stratification, the test set might have no malignant samples. (§14) |
| Pipeline | A chain of data processing steps + a model, bundled into a single object. | scikit-learn's Pipeline prevents data leakage and keeps code organized. |
| Model | A mathematical function, learned from data, that maps inputs (features) to outputs (predictions). | Everything from linear regression to GPT-4 is a "model." |
| Classification | Predicting a category: spam vs. not-spam, malignant vs. benign. | A supervised learning task with discrete outputs. |
| Regression | Predicting a continuous number: house price, temperature, stock return. | A supervised learning task with continuous outputs. |
| SVM (Support Vector Machine) | A classification algorithm that finds the optimal hyperplane separating classes in high-dimensional space. With a radial basis function (RBF) kernel, it can learn non-linear boundaries. | Used in the §14 pipeline on the breast cancer dataset. Sensitive to feature scaling — always scale before training an SVM. (§14) |
| Precision / Recall / F1-score | Metrics for classification quality. Precision: of all predicted positives, how many were actually positive? Recall: of all actual positives, how many did we find? F1-score: harmonic mean of the two, balancing both. | Accuracy alone can be misleading with imbalanced data. A model that always predicts "benign" on a 95% benign dataset gets 95% accuracy but 0% recall for malignant. (§14) |
| Neural Network | A model inspired by the brain: layers of interconnected nodes that learn by adjusting weights. | The foundation of deep learning. Built with PyTorch or TensorFlow. |
| Agent | An autonomous system that perceives its environment, reasons, and takes actions to achieve goals. | The frontier of AI — agents combine LLMs, tools, and memory to solve complex tasks. |
| Vectorization | Replacing explicit Python loops with array-level operations (NumPy/Pandas). | 10–100× faster because the work happens in compiled C, not interpreted Python. |
| Overfitting | A model that performs well on training data but poorly on unseen data. | Detected by comparing train vs. test accuracy. Cured by more data, simpler models, or regularization. |
| Underfitting | A model that performs poorly on both training and test data — it's too simple to capture the patterns. | Cured by a more complex model, better features, or training longer. If both train and test accuracy are low, you're underfitting. (§14) |
| Data Leakage | Accidentally using information from the test set during training, producing misleadingly good results. | Pipelines and careful train/test splitting prevent this. |
| Experiment | A repeatable process that produces an observation. | Examples include a coin toss, a lab measurement, a diagnostic test, or a model prediction. (Chapter 4) |
| Outcome | One specific result of an experiment. | Outcomes make probability countable or measurable before a formula is applied. (Chapter 4) |
| Sample Space | The set of all possible outcomes for an experiment. | Probability statements are only meaningful once the sample space is defined. (Chapter 4) |
| Event | A subset of the sample space. | The event is the thing whose probability is being calculated. (Chapter 4) |
| Conditional Probability | The probability of one event after restricting attention to another event. | Written P(A | B). Direction matters: P(A | B) is usually not P(B | A). (Chapter 4) |
| Bayes' Theorem | The rule for updating a hypothesis after evidence arrives. | Combines prior probability, likelihood, and total evidence probability to produce a posterior probability. (Chapter 4) |
| Random Variable | A numerical value determined by an uncertain process. | Examples: number of successes, number of arrivals, blood pressure, model score. (Chapter 4) |
| PMF | Probability mass function for a discrete random variable. | Gives P(X = k) for countable values. (Chapter 4) |
| PDF | Probability density function for a continuous random variable. | Probability is area under the curve, not the height at one point. (Chapter 4) |
| CDF | Cumulative distribution function. | Gives P(X <= x) for discrete or continuous variables. (Chapter 4) |
| PPF / Inverse CDF | Percent point function, the inverse of the CDF. | Gives the cutoff value for a chosen cumulative probability; scipy.stats calls this .ppf(). (Chapter 4) |
| Binomial Distribution | Distribution for the number of successes in fixed independent yes/no trials. | Use when n trials and success probability p are known. (Chapter 4) |
| Poisson Distribution | Distribution for counts in a fixed interval at a known average rate. | Use when the average rate is known but the trial count is not natural. (Chapter 4) |
| Normal Distribution | Continuous bell-shaped distribution defined by mean and standard deviation. | Central for measurement variation, z-scores, sampling distributions, and inference. (Chapter 4) |
| z-score | A standardized value measured in standard deviations from the mean. | z = (x - mu) / sigma; connects raw measurements to standard Normal probabilities. (Chapter 4) |
G - Key Python Packages¶
These are the most-used packages in the AI/ML Python ecosystem. All are installed via pip install <name> or uv pip install <name> and are free / open-source.
| Package | What It Does | Why You Need It | Install | Docs |
|---|---|---|---|---|
numpy |
N-dimensional arrays, linear algebra, random numbers | The numeric foundation — every ML library depends on it | pip install numpy |
numpy.org |
pandas |
DataFrames for tabular data: loading, cleaning, grouping, joining | The workhorse of data analysis — you'll use it in every project | pip install pandas |
pandas.pydata.org |
matplotlib |
2D plotting library: line charts, histograms, scatter plots | The base visualization layer — most other plotting libraries build on it | pip install matplotlib |
matplotlib.org |
seaborn |
Statistical data visualization (built on matplotlib, prettier defaults) | One-line heatmaps, pair plots, box plots for EDA | pip install seaborn |
seaborn.pydata.org |
plotly |
Interactive browser-based plots and dashboards | Hover, zoom, trace toggles, HTML export, and exploratory graphics for the public reader | pip install plotly |
plotly.com/python |
scikit-learn |
Classical ML algorithms: regression, classification, clustering, pipelines | The standard ML toolkit — you'll learn it in Chapters 4-5 | pip install scikit-learn |
scikit-learn.org |
scipy |
Scientific computing: optimization, statistics, signal processing, sparse matrices | Extends NumPy with advanced math — used behind the scenes by scikit-learn | pip install scipy |
scipy.org |
pytorch |
Deep learning framework by Meta: tensors, autograd, neural network modules | The most popular framework for research and production deep learning | pip install torch |
pytorch.org |
tensorflow |
Deep learning framework by Google: computation graphs, Keras high-level API | Widely used in production; Keras makes it beginner-friendly | pip install tensorflow |
tensorflow.org |
transformers |
Pre-trained NLP/vision models (BERT, GPT, ViT) from Hugging Face | Access thousands of state-of-the-art models with a few lines of code | pip install transformers |
huggingface.co |
requests |
Simple HTTP library for calling web APIs | The standard way to fetch data from URLs and REST APIs | pip install requests |
docs.python-requests.org |
python-dotenv |
Load .env files into environment variables at runtime |
Keeps secrets out of code — load_dotenv() at startup |
pip install python-dotenv |
pypi.org/project/python-dotenv |
black |
Opinionated code formatter — reformats your code to one consistent style | Eliminates style debates, keeps code readable | pip install black |
black.readthedocs.io |
ruff |
Extremely fast Python linter and formatter (written in Rust) | Catches bugs and style issues before you run your code | pip install ruff |
docs.astral.sh/ruff |
pytest |
Testing framework: write functions starting with test_ and run pytest |
Automated testing catches regressions — essential for reliable code | pip install pytest |
pytest.org |
H - Notation Used in This Notebook¶
| Symbol / Convention | Meaning |
|---|---|
monospace code |
Python code, file names, commands |
| bold | Key terms or emphasis |
| italic | Conceptual emphasis, book/document titles |
| $\LaTeX$ math | Equations and mathematical notation |
| $\S\,n$ | Section number $n$ |
| $\checkmark$ / $\times$ | Yes / No in tables |
>>> |
Python interactive prompt (REPL) |
# in code |
A comment — ignored by Python, explains code to humans |
→ |
"Leads to" or "produces" |
snake_case |
Naming convention for variables and functions: my_variable, calculate_total() |
PascalCase |
Naming convention for classes: MyClass, DataLoader |
UPPER_SNAKE_CASE |
Naming convention for constants: MAX_RETRIES, PI |
I - Coding Conventions and Beginner Traps¶
These tables are reference material. The chapter explains why conventions matter; this appendix gives the lookup version.
Naming Conventions¶
| What | Convention | Examples | Avoid |
|---|---|---|---|
| Variables | snake_case |
patient_age, total_count, file_path |
patientAge, PatientAge, unclear single letters |
| Functions | snake_case |
calculate_bmi(), load_data() |
CalculateBMI(), calcBMI(), f() |
| Classes | PascalCase |
PatientRecord, DataLoader |
patient_record, dataloader |
| Constants | UPPER_SNAKE_CASE |
MAX_RETRIES, DEFAULT_TIMEOUT |
Ordinary-looking lowercase names for fixed values |
| Modules and files | snake_case.py |
data_loader.py, test_models.py |
DataLoader.py, data-loader.py |
| Internal names | Leading underscore | _internal_cache, _validate() |
Treating internal helpers as public API |
| Special methods | Double underscore names reserved by Python | __init__(), __str__() |
Inventing new double-underscore names |
Common Beginner Traps¶
| Trap | What goes wrong | Better habit |
|---|---|---|
| Mutable default arguments | One list or dictionary is shared across calls | Use None, then create a new object inside the function |
| Modifying a list while iterating | Items are skipped or state becomes confusing | Build a new list or iterate over a copy |
Confusing = and == |
Assignment and comparison are mixed up | Read = as "store this value" and == as "compare these values" |
Forgetting self in a class method |
Instance data cannot be reached correctly | Include self as the first parameter of instance methods |
Off-by-one with range() |
The stop value is excluded | Say the half-open interval out loud: start included, stop excluded |
| Aliasing a mutable object | Two names point to the same list or dictionary | Use a real copy when independent state is intended |
| Leaving files open | Resources may not be released correctly | Use with open(...) as handle: |
| Catching all exceptions | Real defects are hidden | Catch the specific exception you expect |
| Overusing global variables | Data flow becomes hard to reason about | Pass values into functions and return results |
| Magic numbers | The meaning of a threshold is lost | Give important constants descriptive names |