Computing (KS3)
Computing for UK Key Stage 3 (Years 7-9, ages 11-14), following the National Curriculum for Computing. Covers computational thinking, programming, data representation, computer systems, networks and the internet, and digital literacy and e-safety.
Ämne: Teknik · Nivå: Högstadium (13–15) · 400 kort
Innehåll
- An algorithm is a precise, step-by-step set of instructions for solving a problem or completing a task.
- Decomposition means breaking a large, complex problem down into smaller, more manageable parts that are easier to solve.
- Abstraction means hiding or removing unnecessary detail so you can focus only on the information that matters for solving the problem.
- Pattern recognition means looking for similarities or trends between or within problems, so a solution that works for one can be reused for others.
- The four cornerstones of computational thinking are decomposition, pattern recognition, abstraction and algorithms.
- A flowchart is a diagram that uses connected boxes and arrows to show the steps of an algorithm and the order they happen in.
- In a flowchart, a rectangle represents a process or action, and a diamond represents a decision (a yes/no or true/false question).
- In a flowchart, a rounded rectangle (terminator) marks the START and STOP of the algorithm, and a parallelogram represents input or output.
- Pseudocode is a way of writing an algorithm in plain, structured English. It is not run by a computer but helps a programmer plan the code.
- A good algorithm should be unambiguous (each step is clear), correct (it solves the problem) and finite (it eventually stops).
- A linear search checks each item in a list one by one, from start to end, until it finds the target or reaches the end.
- A binary search repeatedly checks the middle item of a sorted list and discards the half that cannot contain the target. The list MUST be sorted first.
- A bubble sort compares pairs of neighbouring items and swaps them if they are in the wrong order, repeating until the list is sorted.
- Sequence, selection and iteration are the three basic building blocks (programming constructs) used to control the order in which instructions run.
- Sequence means carrying out instructions one after another, in the exact order they are written.
- Selection means choosing between different actions depending on whether a condition is true or false, usually with IF statements.
- Iteration means repeating a block of instructions. This repetition is also called a loop.
- Efficiency describes how few steps or how little time and memory an algorithm needs. A more efficient algorithm reaches the answer with less work.
- A trace table is used to follow an algorithm step by step, recording how the value of each variable changes as the program runs.
- A variable is a named storage location in a program that holds a value which can change while the program runs.
- A constant is a named value that stays the same throughout a program, such as PI = 3.14.
- Common data types are integer (whole numbers), float/real (decimal numbers), string (text), and Boolean (True or False).
- A string is a piece of text, such as a name or a sentence. In Python it is written inside quotation marks, for example "Hello".
- An integer is a whole number with no decimal point, such as 7, 0 or -25. A float (real) number has a decimal point, such as 3.5.
- The arithmetic operators are + (add), - (subtract), * (multiply) and / (divide). In Python ** means 'to the power of'.
- Comparison operators compare two values: == (equal to), != (not equal to), < (less than), > (greater than), <= and >=.
- The three logical operators are AND, OR and NOT. They combine or reverse the true/false result of conditions.
- An AND condition is only true when BOTH of its conditions are true. For example, (age > 12) AND (age < 20).
- An OR condition is true when AT LEAST ONE of its conditions is true. It is only false when all conditions are false.
- A NOT operator reverses a condition: NOT True becomes False, and NOT False becomes True.
- A FOR loop repeats a block of code a fixed, known number of times (count-controlled iteration).
- A WHILE loop repeats a block of code as long as a condition stays true (condition-controlled iteration). It may run zero times.
- An infinite loop is a loop whose condition never becomes false, so it never stops. It is usually a programming mistake.
- A function (or procedure) is a named block of code that does a specific job and can be reused by calling its name.
- Using functions avoids repeating code, makes programs shorter and easier to read, and means a change only has to be made in one place.
- In Python, the input() command gets text typed by the user, and the print() command displays output on the screen.
- Python uses indentation (spaces at the start of a line) to show which lines belong inside a loop, an if statement or a function.
- Scratch is a block-based programming language where you drag and join coloured blocks instead of typing code. It is often used before learning Python.
- Python is a text-based, high-level programming language widely used in schools and industry because its commands read almost like English.
- Debugging is the process of finding and fixing errors (bugs) in a program so that it works correctly.
- A syntax error breaks the rules of the programming language, such as a missing bracket or colon, so the program will not run at all.
- A logic error lets the program run but produces the wrong result, because the instructions do not do what was intended.
- A list (or array) is a single variable that can store many values together, accessed by their position (index) in the list.
- In most programming languages, including Python, the first item in a list has index 0, not index 1.
- A comment is a note in the code that the computer ignores. In Python a comment starts with the # symbol and explains what the code does.
- A condition is a question that can only be answered True or False, such as score >= 50. Conditions control selection and while loops.
- An IF...ELSE statement runs one block of code when a condition is true and a different block when it is false.
- In Python, assignment uses a single equals sign (x = 5), while comparison for equality uses a double equals sign (x == 5).
- Input means data going into a program, processing means working with that data, and output means the results coming out. This is the input-process-output model.
- A bit (binary digit) is the smallest unit of data in a computer. It can only be 0 or 1.