Decomposition, patterns, abstraction, algorithms Β· Python syntax, data types, functions, files Β· 90 terms
Click a topic above to jump straight in β
The problem-solving mindset behind all of computer science.
1The study of computers, algorithmic processes, programming, computational thinking, computer systems, data, and the impact of computing on society.
Be able to describe CS as more than just coding β it includes data, systems, society and problem-solving.
A problem-solving approach that uses ideas such as decomposition, abstraction, pattern recognition, logic and algorithms so that a solution can be automated or implemented by a computer.
Think of how a chef approaches a new recipe. They break it down into stages (decomposition), ignore irrelevant details like what colour plate to use (abstraction), notice that sauces always need similar steps (pattern recognition), and follow a recipe (algorithm). That's computational thinking in real life.
Breaking a large or difficult problem into smaller, more manageable parts.
Building a house: instead of "build a house," you break it into: lay foundation β build walls β add roof β install plumbing β decorate. Each part is tackled separately.
Ignoring unnecessary detail and focusing on the important features of a problem or system.
A map is an abstraction of the real world β it shows roads and landmarks but ignores the colour of buildings, the height of trees, or what's in shop windows. Only what matters for navigation is included.
Exam questions often ask: "What details are ignored in this model/diagram?" β that's testing your understanding of abstraction.
Identifying similarities, repeated structures or trends that can help solve a problem.
Spotting that every morning you wake up, brush your teeth, and have breakfast in the same order β that's a pattern. In coding, you notice that calculating an average always needs the same steps regardless of what data it is.
Creating a solution that works for a whole class of similar problems, not only one specific example.
Instead of writing a recipe specifically for chocolate cake, you write a general "bake a cake" recipe that works for any flavour by changing the ingredients. Your solution generalises.
Designing a clear sequence of steps that can solve a problem.
Writing directions to your house: "Turn left at the church, go straight for 200m, turn right at the schoolβ¦" Every step is specific, ordered and unambiguous β just like an algorithm.
Reasoning about conditions that are either true or false, often using Boolean expressions and logic gates.
A bouncer at a club: "You can enter IF you are over 18 AND have ID." Two conditions, both must be true. That's Boolean logic with an AND.
Using computing technology to carry out tasks with little or no human intervention.
A dishwasher automates washing up β you load it, press start, and it does the work. Similarly, a program can automatically send emails, process data, or control machinery.
A digital product created using computing, such as a program, website, simulation, animation, app, data visualisation or embedded system.
Your LCCS coursework project is a computational artefact β make sure you can describe what yours does using this term.
A rule-of-thumb or approximate problem-solving method used when finding the perfect solution would take too long or use too many resources.
If you need to guess how long a journey will take, you might say "about 30 minutes per 30km on a motorway" β that's a heuristic. It's not exact, but it's good enough and fast. Used in route-planning problems like the Travelling Salesperson Problem.
A simplified representation of a real-world system used to understand, predict or test ideas.
A weather forecast model isn't the actual atmosphere β it's a simplified mathematical copy. Scientists adjust variables and see what happens without needing to change real weather.
A computer-based imitation of a real process or system, often used to test what might happen under different conditions.
Flight simulators train pilots without using a real plane. The computer mimics real flight conditions β crashes don't hurt anyone. A pandemic simulation lets scientists test "what if we introduce a vaccine?" without risking real lives.
The current condition or configuration of a system at a particular moment.
A traffic light has states: Red, Amber, Green. At any given moment, it is in exactly one state. Similarly, a game character can be in state "walking," "jumping," or "dead."
A change from one state to another caused by an input, rule or event.
The traffic light transitions: Red β (timer expires) β Green β (timer expires) β Amber β (timer expires) β Red. Each transition is triggered by an event.
A model made of a finite number of states and rules for moving between states based on inputs.
A simple vending machine is an FSM: states are "waiting," "item selected," "payment received," "dispensing." It moves between states based on inputs (button press, coins inserted).
Exam may show a state diagram and ask you to trace the final state given a sequence of inputs.
A theoretical model of computation using states, rules and a tape. It is used to reason about what can and cannot be computed.
Imagine an infinitely long paper tape and a robot that can read one symbol at a time, write a new symbol, and move left or right. Simple as it sounds, this model can in theory compute anything a modern computer can β it's the foundation of computer science theory.
A problem is computable if an algorithm or machine can solve it in a finite number of steps.
A systematic approach: investigate, plan/design, create, test/evaluate and iterate.
I Plan Carefully, Then Improve β Investigate, Plan, Create, Test, Iterate.
Repeating and improving a solution based on testing, feedback or new requirements.
An artist sketches a draft, gets feedback ("nose looks wrong"), improves it, gets more feedback, and repeats. Each pass is an iteration. Note: this is different from a loop in code, though both involve repetition.
Variables, data types, loops, functions and everything Python.
2A set of instructions written in a programming language to make a computer perform a task.
The human-readable instructions written by a programmer before/while a program runs.
A program file, often a small Python program, that can be run by an interpreter.
Software used to write, edit, run and debug programs. Examples: IDLE, Thonny, VS Code.
An IDE is like a fully kitted workshop β it has the workbench (editor), tools (debugger), and a way to test your work (run button), all in one place. Writing code in a basic text editor without an IDE is like building furniture with just a knife.
A program that executes high-level code, such as Python, by translating and running it line by line as needed.
Like a live interpreter at a United Nations meeting β they translate each sentence as the speaker says it, immediately. Python is normally interpreted.
Software that translates a whole high-level program into machine code or another lower-level form before it runs.
Like translating an entire book from Irish to English before publishing it. The whole translation happens first, then you read the finished book. Faster to run than an interpreter, but the translation step takes time upfront.
The rules for writing valid code in a programming language.
Just like English has grammar rules (capital letter at start of sentence, full stop at end), Python has syntax rules. Break them and the language won't understand you.
An error caused by breaking the grammar/rules of the programming language, so the code cannot run correctly.
Examples: missing colon after if, unclosed bracket, wrong capitalisation of True.
An error where code runs but gives the wrong result because the algorithm or reasoning is incorrect.
You follow a recipe perfectly but accidentally used salt instead of sugar β the cake bakes fine (no syntax error!) but tastes terrible. The process ran, but the logic was wrong.
An error that occurs while a program is running, often because of invalid data or an impossible operation.
A car that starts fine (no syntax error) but breaks down mid-journey when you hit a pothole (unexpected condition at runtime). Example: dividing by zero, or accessing list index 10 when the list only has 5 items.
A mistake or fault in a program that causes incorrect or unexpected behaviour.
Finding, understanding and fixing errors in a program.
Mention trace tables, print statements, and careful checking of output as debugging methods.
Text in code for humans to read that is ignored by the computer when the program runs. In Python, single-line comments begin with #.
A named location/reference used to store a value while a program runs.
A labelled box. The label is the variable name (score), the thing inside is the value (42). You can replace what's inside the box at any time.
The item of data stored in a variable, such as 5, "hello" or True.
Giving a value to a variable. In Python this is done using =, for example x = 5.
Do not confuse = (assignment) with == (checking equality). Very common exam mistake!
The = symbol in programming when it assigns the right-hand value/expression to the variable on the left. The right-hand side is always calculated first.
A piece of code that evaluates to a value, such as x + 2 or len(names).
A symbol or keyword that performs an operation on values, such as +, -, *, /, %, // or **.
% = modulo (remainder after division). // = integer/floor division. ** = power/exponent.
A value or variable that an operator acts on. In x + 3, x and 3 are operands.
The order in which operations are evaluated when there are multiple operators in an expression.
BIMDAS: Brackets, Indices (powers), Multiplication/Division, Addition/Subtraction β same as maths.
A whole number data type, such as -3, 0, 5 or 255. In Python the type is int.
A decimal/floating-point number data type, such as 3.14 or -99.99. In Python the type is float.
A sequence of characters used for text, usually written inside quotes, such as "Hello". In Python the type is str.
Phone numbers should be strings (not ints) if you don't need to do maths with them β otherwise leading zeros get cut off.
A data type with only two possible values: True or False.
A light switch is Boolean β it's either on or off, nothing in between.
A category of data that tells the computer what kind of value is being stored and what operations make sense.
Core Python types: int, float, str, bool, list.
Changing a value from one data type to another, such as int("5") or str(25).
input() always returns a string β you must cast to int or float if you need a number.
Data supplied to a program, system or algorithm β for example through the keyboard, a sensor or a file.
Data produced by a program, system or algorithm β for example text on a screen, a chart or a signal to an actuator.
A Python function that displays output on the screen.
A Python function that reads text typed by the user and returns it as a string.
A reserved word in a programming language with special meaning, such as if, else, while or def. Cannot be used as variable names.
A naming convention where words are joined and later words begin with capital letters, e.g. houseNumber.
Examples of IDEs/editors commonly used for Python or web development in schools. Thonny and IDLE are beginner-friendly; VS Code is a professional editor. Tool names are not core syllabus definitions but useful to recognise.
The full list of reserved Python words such as if, else, def, while, return. You don't need to memorise every keyword, but know they cannot be used as variable names.
A value passed into a function when it is called, such as 5 in print(5).
You order a pizza (call the function) and specify "pepperoni" (argument). The pizza place uses your specification to make the right pizza.
A variable listed in a function definition that receives an argument value.
Parameter = in the function definition. Argument = what you pass when you call it.
A named reusable block of code that performs a task and may accept parameters and return a value.
A function is like a microwave. You put food in (arguments), it does its thing, and gives you back heated food (return value). You can use the microwave over and over without rewriting "how to heat food" each time.
A statement that sends a value back from a function to the code that called it, often ending the function.
A reusable block of code that carries out a task but is mainly used for its action rather than returning a value. In Python, usually just a function without a useful return.
A technique where a function calls itself to solve smaller versions of a problem.
Russian nesting dolls (matryoshka). To open the full set, you open the outer doll, which reveals a smaller doll, which you open again⦠until you reach the tiniest doll (base case) which doesn't open further.
The condition in a recursive function that stops further recursive calls.
Without a base case, recursion never stops β stack overflow!
The part of a recursive function that calls the function again with a smaller/simpler problem, working towards the base case.
An error that can occur when too many function calls are stored on the call stack, often from uncontrolled recursion.
Choosing between different paths in an algorithm/program based on a condition, usually using if, elif and else.
A Boolean expression used to decide whether a block of code should run. Example: if score >= 50:
A selection statement that runs a block of code only when a condition is True. Indentation is part of Python syntax.
Python keyword meaning "else if"; used to check another condition after a previous if/elif is False.
A selection branch that runs when all previous if/elif conditions are False. Often used as the default case.
Repeating a set of instructions multiple times.
A washing machine drum spinning: it repeats the same rotation over and over until done. Each spin is one iteration.
A loop that iterates over a sequence or a range of values, often when the number of iterations is known.
A loop that repeats while a condition remains True, often when the number of iterations is not known in advance.
Stirring a pot of jam: you keep stirring while the jam hasn't set. You don't know how many stirs that will take β you just keep going until the condition changes.
A loop placed inside another loop. Useful for grids, tables and repeated repeated tasks.
A loop that never ends because its stopping condition is never reached. Usually a logic error.
Executing instructions one after another in order. One of the three building blocks: sequence, selection, iteration.
An ordered collection of values stored under one variable name. Python lists use square brackets.
A numbered shopping list. Each item has a position (index). You can read, change or remove any item using its position number.
A single item in a list or array.
The position number used to access an item in a list or string. Python starts indexing at 0.
First item is at index 0, not 1. Trying to access index 5 in a 5-item list causes a runtime error (max index is 4).
A numbering system where the first item is at index 0, the second at index 1, and so on.
A part of a string or list selected using start and stop indexes, such as name[0:2]. The stop index is not included.
A Python function that returns the number of items in a sequence such as a list or string.
A list method that adds an item to the end of a list.
A Python data structure that stores key-value pairs.
Like a real dictionary β you look up a word (key) and get its definition (value). {"name": "Alice", "age": 17}
An ordered collection similar to a list but typically immutable (cannot be changed after creation).
Reusable code that can be imported into a program to provide extra functions or tools.
Like downloading an app β instead of writing your own camera software, you import a library that already does it. Examples: random, math, pandas, matplotlib.
A statement that makes code from a module/library available in your program. Example: from random import randint.
A value generated unpredictably within a defined range or set, often used in simulations/games.
Joining strings together using + or another method. Example: "Hello" + " " + "World"
Repeating a string using *, such as "Hi" * 3 gives "HiHiHi".
A character sequence beginning with backslash used to represent special characters such as newline \n or tab \t.