Glossary

Every term the lessons lean on, in plain language — from the basics (variable, loop, boolean) through the abstract (truthiness, mutable) to networks (HTTP, DNS, IP address) and the cost of algorithms (polynomial vs exponential time). Hover or tab onto an underlined term anywhere on the site for a quick definition.

Programming

Variable

A named place that refers to a value; the name can be re-pointed at a new value.

A variable is a name bound to a value. It is not a box that remembers everything you put in it — reassigning the name simply points it at a new value, and the old one is gone unless another name still holds it.

See alsoValue·Assignment (=)·Name binding

Appears inValues and names

Value

A piece of data a program computes with — a number, some text, True or False.

Every value has a type that decides what you can do with it. Values are what expressions evaluate to and what variables refer to.

See alsoVariable·Data type

Appears inValues and names

Name binding

Attaching a name to a value with `=`; rebinding moves the name, it doesn't change the old value.

Binding a name with `=` makes it refer to a value. Binding it again moves the name to a new value; if you need the old one later, save it under another name first.

See alsoVariable·Assignment (=)·Aliasing

Appears inValues and names

String (str)

Text — a sequence of characters in quotes, like "racecar".

Strings are sequences you can index and slice, and they are immutable: "changing" a string actually makes a new one.

See alsoImmutable·Index·Slice

Appears inPalindrome check

Expression

Any piece of code that evaluates to a value, like 2 + 3 or x > 0.

Expressions compute values; statements do things. A comparison like age >= 18 is an expression that evaluates to a Boolean.

See alsoValue·Operator·Comparison

Appears inOperator precedence: × before +

Operator precedence

The order operators run in: × and ÷ happen before + and −, regardless of left-to-right.

Python follows the usual maths order, not strict left-to-right, so 2 + 3 * 4 is 14, not 20. Parentheses override it when you mean the addition first.

See alsoOperator·Expression

Appears inOperator precedence: × before +

Exponent (**)

Raising to a power: 2 ** 3 is 8. In Python `^` is NOT power — it is bitwise XOR.

Use ** for powers. The `^` symbol many languages and spreadsheets use for powers is bitwise XOR in Python, so 2 ^ 3 silently gives 1.

See alsoOperator

Appears inPowers: ** not ^

Boolean operator (and / or / not)

Combine conditions. `or` returns one of its operands, not always a tidy True/False.

`x == 1 or 2` is read as (x == 1) or 2 and yields the truthy 2 — not what you meant. Compare against each value in full: x == 1 or x == 2.

See alsoBoolean (bool)·Truthiness·Comparison

Appears inand / or / not

elif ladder

A chain of elifs; the first true branch wins, so the order of the tests is the logic.

Because the first matching branch wins and the rest are skipped, a grading ladder must test the strictest band first — put the loosest first and the strict branches become unreachable.

See alsoBranch·Conditional (if)

Appears inThe elif ladder: order matters

Loop

Code that repeats — a `for` over a sequence or a `while` on a condition.

Loops do the same work for each item or until a condition changes. Never delete from a list while looping over it — the positions shift under you.

See alsoIteration·range()·Accumulator

Appears inAdding up a list·Filtering a list

Iteration

One pass through a loop body.

Each time around the loop is an iteration, usually with the loop variable bound to the next item or index.

See alsoLoop·range()

Appears inAdding up a list·Linear search

range()

Produces integers to loop over; range(n) is 0..n-1 — the end is excluded.

range(len(nums)) yields each valid index. The exclusive end is a common off-by-one trap: range(5) stops at 4.

See alsoLoop·Index

Appears inLinear search·Decimal to binary

Accumulator

A variable that builds up a result across a loop — a running total or list.

Start it at a base (0 for a sum, [] for a list) and update it each pass with += or append. Using = instead of += overwrites instead of accumulating.

See alsoLoop·List

Appears inAdding up a list·Running maximum

Parameter

A name in a function definition that receives an argument when the function is called.

Parameters are the function's inputs. Arguments fill them by position (left to right) unless you name them, so argument order matters.

See alsoArgument·Function

Appears inParameters: order matters

Argument

A value passed into a function call; positional arguments fill parameters left to right.

remaining(30, 100) binds the first parameter to 30 and the second to 100. Naming them — remaining(budget=100, spent=30) — makes the intent unmissable.

See alsoParameter·Function

Appears inParameters: order matters

Return value

What a function hands back; a function with no `return` hands back None.

`return` ends the function and gives a value to the caller. Computing the answer but forgetting to return it is a classic bug — the work happens, nothing comes out.

See alsoFunction·None

Appears inFunctions: package an idea you can call

Scope

The region where a name is visible; a function's locals live in its own frame.

Names created inside a function are local to it and vanish when it returns. The call stack tracks which frame's names are currently in view.

See alsoFunction·Call stack

Appears inFunctions: package an idea you can call

Call stack

The stack of active function frames; a call pushes a frame, a return pops it.

Each call adds a frame with its own locals; returning removes it. The stack is how a program remembers where to go back to, and how recursion keeps its many copies apart.

See alsoFunction·Scope·Recursion

Appears inFunctions: package an idea you can call

Recursion

A function that calls itself, each call a new frame, until a base case stops it.

Recursion solves a problem in terms of a smaller version of itself. Without a base case that stops the calls, it never ends.

See alsoFunction·Call stack

Appears inFunctions: package an idea you can call

Index

A position in a sequence, starting at 0; s[0] is the first item.

Indices number items from 0. Negative indices count from the end (s[-1] is the last). Going past the end is an error.

See alsoList·Slice·range()

Appears inLinear search·Palindrome check

Immutable

Cannot be changed in place (ints, strings, tuples); "changing" one makes a new value.

Immutable values are safe from aliasing surprises: name = name.upper() makes a new string and rebinds the name; the original is untouched.

See alsoMutable·String (str)·Integer (int)

Appears inAliasing: two names, one list

Aliasing

Two names pointing at the same object, so changing it through one is seen through the other.

Assignment binds another name to the same object; it does not copy. Equal object ids reveal the sharing. To get an independent copy of a list, slice it (scores[:]).

See alsoReference·Mutable·Slice

Appears inAliasing: two names, one list·Sorting into two piles

List comprehension

A one-expression loop that builds a list, like [n for n in nums if n > 10].

A comprehension is concise shorthand for a build-a-new-list loop. Python still runs it as a loop internally; the finished list appears at the end.

See alsoList·Loop

Appears inFiltering a list

Syntax error

Code the interpreter can't parse at all, so it never runs (e.g. `if x = 5`).

A syntax error is caught before the program runs. It differs from a logic bug, where the code runs fine but produces the wrong answer.

See alsoAssignment (=)

Sentinel value

A stand-in value (like -1 for "not found") that can't be mistaken for a real answer.

Linear search starts found at -1: no real index is negative, so -1 unambiguously means "not found yet".

See alsoIndex

Appears inLinear search

Data & representation

Bit

The smallest unit of data: a single 0 or 1.

Everything a computer stores is bits. Combining bits in place-value columns (powers of two) represents numbers, text, and more.

See alsoByte·Binary·Place value

Appears inDecimal to binary

Byte

A group of 8 bits; can represent 256 different values (0–255).

A byte is the usual unit of storage. An 8-bit counter wraps from 255 back to 0 — that's overflow.

See alsoBit·Overflow

Appears inOverflow

Binary

Base-two numbers: each column is a power of two (1, 2, 4, 8, …).

Binary is place value in base two. To write 13, fill the columns biggest-to-smallest: 8 + 4 + 1 = 1101. To read it back, double and add.

See alsoBit·Place value·Decimal

Appears inDecimal to binary·Binary to decimal

Place value

Each column is worth a power of the base; binary doubles, decimal multiplies by ten.

The same digit means different amounts in different columns. Walking columns in the right order (big to small) is what makes base conversion work.

See alsoBinary·Decimal

Appears inDecimal to binary·Binary to decimal

Decimal

Base-ten numbers: columns are 1, 10, 100, …

The everyday number system. Mixing up base ten and base two is the classic binary-to-decimal bug (reading 1101 as eleven hundred).

See alsoBinary·Place value

Appears inBinary to decimal

Hexadecimal

Base-sixteen numbers (0–9 then A–F); a compact way to write bytes.

Each hex digit packs four bits, so a byte is two hex digits. It's common for colours and memory addresses.

See alsoBinary·Byte

ASCII

A code that maps characters to numbers so text can be stored as bits.

ASCII assigns each letter and symbol a number (A is 65). It's why text is just numbers under the hood.

See alsoBit·String (str)

Overflow

When a fixed-width number runs out of room and wraps around (255 → 0 in 8 bits).

Hardware integers have a fixed number of bits, so they wrap like a clock. Python's integers have no fixed width, so they grow instead of overflowing.

See alsoByte·Modulo (%)·Integer (int)

Appears inOverflow

Round-off error

Small errors from storing fractional numbers in binary — why 0.1 + 0.2 ≠ 0.3.

Most decimals can't be represented exactly in binary floating-point, so arithmetic accumulates tiny errors. Compare floats with a tolerance, not ==.

See alsoFloating-point (float)·Equality (==)

Appears inRoundoff

Compression

Storing data in fewer bits by exploiting patterns or redundancy.

Compression shrinks data for storage or transfer. Lossless compression reconstructs the original exactly; lossy compression trades some fidelity for size.

See alsoRun-length encoding (RLE)·Lossless·Lossy

Appears inRun-length encoding

Run-length encoding (RLE)

Compress repeats by storing (count, value) pairs instead of each item.

A row like RRRGG becomes (3, R)(2, G). It's a simple, lossless scheme — and forgetting to emit the final run is a classic bug.

See alsoCompression·Lossless

Appears inRun-length encoding

Lossless

Compression that can rebuild the original data exactly, bit for bit.

Lossless schemes (like RLE or ZIP) lose nothing — the decompressed data is identical to the original. Required for text and code.

See alsoCompression·Lossy

Appears inRun-length encoding

Lossy

Compression that discards some detail to save more space (JPEG, MP3).

Lossy schemes throw away information the eye or ear is unlikely to miss, achieving smaller sizes than lossless — but the original can't be perfectly recovered.

See alsoCompression·Lossless

Networks & the internet

Internet

The global network of networks that carries data between computers.

The internet is the physical-and-logical plumbing: cables, routers, and addressing that move packets worldwide. The Web is one thing built on top of it.

See alsoWorld Wide Web (WWW)·Internet vs Web·Packet

Appears inPacket switching

World Wide Web (WWW)

The system of linked pages and sites you browse — built on top of the internet.

The Web is web pages and links served over HTTP. It runs on the internet but is not the same thing: email and video calls use the internet without using the Web.

See alsoInternet·Internet vs Web·HTTP·URL

Internet vs Web

The internet is the network; the Web is one service (linked pages) running on it.

People say "the internet" when they often mean "the Web". The internet is the delivery network; the Web, email, and streaming are services that ride on it.

See alsoInternet·World Wide Web (WWW)

Protocol

An agreed set of rules two computers follow so they can understand each other.

Protocols define the format and order of messages. HTTP, DNS, and IP are protocols, each handling a different job in moving and interpreting data.

See alsoHTTP·IP address·DNS

HTTP

The protocol browsers use to request web pages from servers.

HyperText Transfer Protocol is the request/response language of the Web: your browser asks a server for a page, the server replies with it.

See alsoHTTPS·World Wide Web (WWW)·URL·Server

HTTPS

HTTP with encryption, so others can't read or tamper with the traffic.

The S is for secure: HTTPS wraps HTTP in encryption, protecting passwords and data in transit. The padlock in the address bar means HTTPS.

See alsoHTTP·Protocol

URL

A web address — it names the protocol, the host, and the path to a resource.

A URL like https://example.com/page bundles the protocol (https), the host (example.com, resolved by DNS), and the path (/page).

See alsoHTTP·DNS·World Wide Web (WWW)

DNS

The Domain Name System — translates names like example.com into IP addresses.

Computers route by numeric IP address, but people use names. DNS is the internet's phone book, looking up the IP for a name before a connection is made.

See alsoIP address·URL·Protocol

Appears inPacket switching

IP address

A numeric address that identifies a computer on a network, like 142.250.72.14.

Every device on the internet has an IP address so packets can be delivered to it. DNS exists to turn human names into these numbers.

See alsoDNS·Packet·Routing

Appears inPacket switching

Routing

Choosing the path a packet takes from node to node toward its destination.

Routers forward each packet one hop closer to its destination. Because routing is per-hop, the network can reroute around a failed node.

See alsoRouter·Packet·Fault tolerance

Appears inPacket switching·Fault tolerance

Router

A device that forwards packets between networks toward their destination.

Routers are the junctions of the internet, reading each packet's destination and passing it to the next hop along a good path.

See alsoRouting·Packet

Appears inPacket switching

Server

A computer that provides a service (like web pages) to clients that ask for it.

Servers wait for requests and respond — a web server returns pages over HTTP. The requesting computer is the client.

See alsoClient·HTTP

Client

A computer (or app, like a browser) that requests a service from a server.

Your browser is a client: it sends requests to servers and displays the responses. The client/server split organises most internet services.

See alsoServer·HTTP

Bandwidth

How much data a connection can carry per second — its capacity.

Bandwidth is the width of the pipe (e.g. 100 Mbps). It limits throughput but is distinct from latency, the delay before data starts arriving.

See alsoLatency

Latency

The delay before data starts arriving — how long a round trip takes.

Latency is the lag, measured in milliseconds; bandwidth is the capacity. A high-bandwidth link can still feel slow if its latency is high.

See alsoBandwidth

Reassembly

Putting packets back in order at the destination using their sequence numbers.

Because packets can arrive out of order, each carries a sequence number so the receiver can rebuild the original message correctly.

See alsoPacket·Packet switching

Appears inPackets take different routes

Fault tolerance

A system's ability to keep working when part of it fails.

A redundant network reroutes around a dead node; a single-path one strands the packet. Fault tolerance comes from having more than one way through.

See alsoRouting·Packet switching

Appears inFault tolerance

Algorithms & complexity

Algorithm

A step-by-step procedure for solving a problem.

An algorithm is the recipe a program follows. The same problem often has several algorithms that differ in clarity and speed.

See alsoTime complexity·Big-O notation

Appears inLinear search

Time complexity

How an algorithm's running time grows as the input gets bigger.

Complexity describes scaling, not a stopwatch time: it asks how the work grows with input size n. It's the basis for comparing algorithms.

See alsoBig-O notation·Linear time (O(n))·Exponential time

Big-O notation

A shorthand for how an algorithm scales, ignoring constants — O(n), O(n²), O(2ⁿ).

Big-O captures the dominant growth term. O(n) doubles when the input doubles; O(n²) quadruples; O(2ⁿ) explodes. It's how the gap between approaches is named.

See alsoTime complexity·Polynomial time·Exponential time

Constant time (O(1))

Work that doesn't grow with input size — the same cost no matter how big n is.

Looking up a list item by index is constant time. It's the gold standard: the input can grow without the cost growing.

See alsoBig-O notation·Linear time (O(n))

Linear time (O(n))

Work that grows in step with the input — twice the data, twice the time.

Scanning every item once, like linear search, is linear time. Predictable and usually fine, but slower than constant time for big inputs.

See alsoBig-O notation·Constant time (O(1))·Polynomial time

Appears inLinear search

Polynomial time

Running time that grows like n raised to a fixed power — n, n², n³ …

Polynomial-time algorithms (linear, quadratic, …) are considered tractable: doubling the input multiplies the work by a fixed factor, not an exploding one.

See alsoBig-O notation·Linear time (O(n))·Exponential time

Exponential time

Running time that doubles with each extra input — O(2ⁿ); blows up fast.

Exponential algorithms become unusable quickly: adding one item doubles the work. The jump from polynomial to exponential is the line between feasible and infeasible.

See alsoPolynomial time·Big-O notation

Parallelism

Doing several pieces of work at the same time on multiple workers.

Parallelism splits work across workers to finish sooner. It only helps for work that can run independently — and only up to the limit set by dependencies.

See alsoSpeedup·Dependency chain

Appears inParallel speedup

Speedup

How many times faster a parallel run is than the sequential one: sequential ÷ parallel.

Two workers can halve the time on independent tasks (2× speedup) — but a chain of dependent steps can't be sped up by adding workers.

See alsoParallelism·Dependency chain

Appears inParallel speedup

Dependency chain

A sequence of steps that must run in order because each needs the previous result.

Dependencies cap parallel speedup: if step B needs step A's output, no number of workers can make them overlap. The longest chain sets the floor on time.

See alsoParallelism·Speedup

Appears inParallel speedup