In simple terms
A friendly intro before the formal notes — no formulas yet.
Ways of Thinking About Code
A programming paradigm is a fundamental style or 'way of thinking' about how to build computer programs. Different paradigms provide different structures and concepts for solving problems.
Imagine you need to assemble a piece of flat-pack furniture. A 'procedural' paradigm is like following the instruction manual step-by-step. An 'object-oriented' paradigm is like having pre-built components (a 'Leg Unit', a 'Tabletop Unit') that you just connect together. A 'declarative' paradigm is like showing a picture of the finished furniture to a robot and saying 'make this', without specifying the steps.
- 1
First, understand that paradigms are high-level approaches, not specific languages (though languages support certain paradigms).
- 2
Next, distinguish between telling the computer 'how' to do something (Imperative) versus 'what' to achieve (Declarative).
- 3
Within Imperative, learn to spot the difference between a sequence of procedures (Procedural) and interacting objects (Object-Oriented).
- 4
Finally, practice identifying the key features of each paradigm in given code snippets, as this is a common exam task.
Explore the concept
Use the live diagram and synced steps — play it or tap a step card to walk through.
Key formulas
Tap any symbol to reveal exactly what it means and its units.
$Program = Sequence\ of\ Commands + State\ (Variables)$
Full topic notes
Formal explanation with the rigour you need for the exam.
Low-Level vs. High-Level Paradigms
The first major division is between low-level and high-level paradigms. A low-level paradigm involves writing code that is very close to the computer's native machine code. It gives the programmer fine-grained control over hardware, such as memory addresses and CPU registers, but is complex and difficult to write.
Low-Level: Primarily Assembly Language. Code is specific to a particular CPU architecture (e.g., ARM, x86). One-to-one relationship between assembly instructions and machine code instructions.
High-Level: All other paradigms we will discuss (Procedural, OOP, Declarative). Code uses natural language elements, is easier to read and write, and abstracts away the hardware details. One high-level statement translates to many machine code instructions.
The Imperative Paradigm: How to do it
The imperative paradigm is perhaps the most intuitive for beginners. It is based on the idea of giving the computer a sequence of commands to execute, which change the state of the program. You are the manager, giving detailed, step-by-step instructions to your employee (the computer). This paradigm is further divided into procedural and object-oriented programming.
Program = Sequence\ of\ Commands + State\ (Variables)
Procedural Programming: This is a type of imperative programming where the program is built from procedures, also known as subroutines or functions. These are blocks of code that perform a specific task. The focus is on a linear sequence of actions, with data and the procedures that act on that data kept separate. Think of a recipe: a list of steps to follow in order.
The Declarative Paradigm: What to do
The declarative paradigm takes a completely different approach. Instead of writing a step-by-step algorithm, you describe the problem, the desired outcome, and the constraints. The language's implementation then figures out how to achieve that result. It focuses on the 'what' rather than the 'how'. SQL (Structured Query Language) is a perfect example: you SELECT the data you want, but you don't tell the database the step-by-step process of how to find, join, and filter it.
Focus: Describes the logic and desired outcome.
Control Flow: The 'how' is implicit and handled by the language runtime.
State: Avoids changing state and side effects.
Examples: SQL (for databases), HTML (for web page structure), Logic Programming (e.g., Prolog), Functional Programming (e.g., Haskell).
In Paper 4, you will most likely be given a code snippet and asked to identify the paradigm. Your answer must be justified. Always name the paradigm (e.g., 'Object-Oriented') and then list specific features from the code that support your choice, such as 'The use of CLASS...ENDCLASS' or 'The procedure modifies a global variable'.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
The following pseudocode calculates the area of a circle. Identify the programming paradigm and justify your answer with reference to the code.
DECLARE Radius : REAL
DECLARE Area : REAL
PROCEDURE CalculateArea(InRadius : REAL)
Area <- 3.14159 * InRadius * InRadius
ENDPROCEDURE
OUTPUT "Enter the radius:"
INPUT Radius
CalculateArea(Radius)
OUTPUT "The area is: ", Area
- 1
Use of Procedures: The code is structured around a PROCEDURE named CalculateArea which contains a set of instructions to perform a task. [1 mark]
Analyse the following pseudocode. Identify the paradigm and two distinct features of the paradigm present in the code.
CLASS Vehicle
PRIVATE TopSpeed : INTEGER
PUBLIC PROCEDURE New(Speed : INTEGER)
TopSpeed <- Speed
ENDPROCEDURE
PUBLIC FUNCTION GetTopSpeed() RETURNS INTEGER
RETURN TopSpeed
ENDFUNCTION
ENDCLASS
CLASS Car INHERITS Vehicle
PRIVATE NumberOfDoors : INTEGER
PUBLIC PROCEDURE New(Speed : INTEGER, Doors : INTEGER)
SUPER.New(Speed)
NumberOfDoors <- Doors
ENDPROCEDURE
ENDCLASS
MyCar : Car
MyCar <- NEW Car(120, 4)
- 1
Inheritance: The Car class is defined to INHERIT from the Vehicle class. This means Car automatically has the properties and methods of Vehicle, such as TopSpeed and GetTopSpeed(). [1 mark]
How it all connects
The big idea sits in the middle — tap a linked idea to explore the link.
Tap a linked idea to see how it connects back to the main topic — that connection is what examiners reward.
Glossary
Try to recall each definition before you reveal it.
Quick check
Answer in your head first — then tap to check. No pressure.
Revision flashcards
Flip the card. Test yourself before the exam.
What is a programming paradigm?
A style or 'way of thinking' for structuring computer programs. It's a set of concepts and practices that shapes how you solve problems with code.
Key takeaways
Review these before you close the topic — retrieval beats re-reading.
- ✓
Low-Level: Primarily Assembly Language. Code is specific to a particular CPU architecture (e.g., ARM, x86). One-to-one relationship between assembly instructions and machine code instructions.
- ✓
High-Level: All other paradigms we will discuss (Procedural, OOP, Declarative). Code uses natural language elements, is easier to read and write, and abstracts away the hardware details. One high-level statement translates to many machine code instructions.
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Practice Paradigm Identification
Practice Paradigm Identification
Extra simulations & links
PhET, GeoGebra and other curated tools — open in a new tab.
Frequently asked
Checkpoint
One marked question is worth ten re-reads — close the loop before you move on.
Reading it isn’t knowing it — prove it.
Before you move on: do Practice Paradigm Identification on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.