1/917
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is abstraction in computational thinking?
Abstraction is removing unnecessary details and focusing only on the relevant information when solving a problem.
Why is abstraction important in computer science?
It simplifies complex systems so we can focus on what matters.
When you save a file, why is it an example of abstraction?
You don’t need to know where or how it’s stored in binary—just how to save or open it.
What does a satellite navigation map hide from the user?
It hides details like trees and buildings, showing only roads and directions.
Why are icons like a house or key examples of abstraction?
They are simplified images that represent a function, not exact real-world objects.
How is a road map stored in a navigation program?
As data about road connections and distances, not as a visual map.
What does a flowchart represent in abstraction?
A simplified version of a program’s logic without real code.
What do variables like A, B, and C hide from the programmer?
The memory locations, binary values, and how the CPU does calculations.
What is the main goal of abstraction in problem-solving?
To hide unnecessary complexity and highlight important parts.
What is decomposition in computational thinking?
Breaking a complex problem into smaller, more manageable parts.
Why is decomposition important for programmers?
It makes solving large problems easier by solving smaller parts one at a time.
What everyday activities involve decomposition?
Getting ready in the morning, brushing teeth, going to school, and doing homework.
How can crossing the road be seen as decomposition?
You break it into steps: stop, look, decide if it's safe, press button, wait, then cross.
When should graphics and sound be added to a game?
After the main gameplay works — add flair like effects and sound later.
How does decomposition help with teamwork?
Different people can work on different parts at the same time.
How does decomposition save time and cost?
By letting teams work in parallel and reuse code in future projects.
What is a subprogram?
A subprogram is a block of code given a unique, identifiable name in a program.
Why do we use subprograms?
To break a large problem into smaller, more manageable parts.
What are some benefits of using subprograms?
They're easier to code, debug, test, and reuse.
In Python, what keyword is used to define a subprogram?
def
What happens when the main program calls a subprogram?
The program jumps to that subprogram, runs it, and returns to the main program afterward.
How do you call a subprogram in Python?
y writing its name followed by brackets — for example: initialise()
What is used to exit a subprogram early before the last line?
The return
statement.
What are the two types of subprogram?
Procedures and Functions
What are the three main stages of a computer program?
Input, Process, and Output.
What is an input?
Data supplied to a program so it can perform its task.
What is a process?
The action the program takes on the input, like calculations or data changes.
What is an output?
The result produced by the program and given to the user.
What should you think about when planning inputs?
What data is needed
Variable names
Data types (e.g. int
, float
, string
)
What should you think about when planning processes?
What calculations or changes need to happen
Whether data types need to change
What should you think about when planning outputs?
What the user needs to see
Variable names and data types for storing results
What is an algorithm?
A step-by-step set of instructions to solve a problem.
What is pseudocode?
A way to write algorithms that looks like code but uses plain English.
What is a flowchart?
A diagram that shows the steps of an algorithm using shapes and arrows.
What shape means "Start" or "End" in a flowchart?
An oval.
What shape means a decision (yes or no)?
A diamond.
What shape shows a process or calculation?
A rectangle.
What shape is used for input or output?
A parallelogram.
What does a line or arrow show in a flowchart?
The direction or flow of the algorithm.
What does "refining an algorithm" mean?
Changing or improving it to solve a problem better.
What methods do you use in Paper 1 to show algorithms?
Pseudocode and flowcharts.
What are the four primitive data types you need to know?
Integer, real, Boolean, and character.
What is a structured data type?
A sequence of items that are themselves data types.
Give an example of a structured data type.
String, array, or record.
What is a comment in Python?
A line starting with #
, which is ignored by the program.
What is an identifier in Python?
A name used for variables, procedures, or functions, starting with a letter and using letters, numbers, or underscores.
What does assignment mean in Python?
Giving a variable a value using the equals sign.
How do you change data types in Python?
Use conversion functions like int()
, str()
, float()
, or bool()
.
What is sequence in programming?
Instructions are executed one after the other, from top to bottom.
What is selection in programming?
Making a choice using if, else, or elif statements.
What is iteration?
Repeating code using for
or while
loops.
What is a subprogram?
A reusable block of code, like a function or procedure.
What does the print() function do?
Outputs data to the screen.
What does the input() function do?
Takes user input from the keyboard.
Why is indentation important in Python?
It shows which lines belong to the same block of code.
What is a data structure?
A specialised format for organising and storing data.
What is a string made up of?
A sequence of character data types.
What is an array?
A static data structure that stores multiple items of the same data type in contiguous memory.
What does ‘contiguous’ mean in the context of arrays?
The data items are stored next to each other in memory.
What is meant by arrays being zero-indexed?
The first item in the array is at index 0, not 1.
How is a list different from an array in Python?
Lists are not necessarily stored contiguously and can hold mixed data types.
Are arrays static or dynamic?
Static — their size cannot be changed after creation.
What is a one-dimensional array?
An array with one index per item, like a list of names.
What is a two-dimensional array?
An array with two indexes (rows and columns), like a table.
Can arrays contain more than one data type?
No, they must contain only one data type (homogeneous).
What is a record data structure?
A collection of related fields that can each have different data types.
Do Python support records?
No, but other languages like Visual Basic do.
What symbol is used for addition in Python?
+
What symbol is used for subtraction in Python?
-
What symbol is used for multiplication in Python?
*
What symbol is used for division in Python?
/
What symbol is used for exponentiation (power) in Python?
**
What does the modulus operator (%
) return?
The remainder after division
What is integer division and its symbol in Python?
// returns t/he whole number part of the division
What symbol checks if two values are equal?
==
What symbol checks if two values are not equal?
!=
What symbol checks if one value is less than another?
<
What symbol checks if one value is less than or equal to another?
<=
What symbol checks if one value is greater than another?
>
What symbol checks if one value is greater than or equal to another?
>=
What are the three common Boolean operators?
NOT, AND, OR
What does the NOT operator do?
It reverses a Boolean value.
What does the AND operator do?
It returns True only if both conditions are true.
What does the OR operator do?
It returns True if at least one condition is true.
How can you use Boolean operators in loops?
In if, while, or do until statements to control program flow based on conditions.
What is a Boolean expression?
An expression that evaluates to True or False.
What is an example of combining Boolean operators?
if this and that or not other
What are the three types of programming errors?
Syntax errors, logic errors, and runtime errors.
What is a syntax error?
An error that breaks the grammatical rules of the programming language.
What is a logic error?
The program runs, but gives the wrong or unexpected result.
What is a runtime error?
An error that crashes the program while it's running.
Why are logic errors harder to find than syntax errors?
Because the program runs, but the output is wrong.
What is the purpose of the bubble sort algorithm?
To sort an unordered list by repeatedly comparing and swapping adjacent items if they are in the wrong order.
How does the bubble sort algorithm work?
Compare each item with the next one.
Swap if out of order.
Repeat passes until no more swaps are needed.
Each pass "bubbles" the largest/smallest item to its correct position.
What happens during each pass of bubble sort?
The largest remaining unsorted item moves to its final position at the end of the list.
What is the main advantage of bubble sort?
It’s simple and easy to implement, especially for small data sets.
What is the main disadvantage of bubble sort?
It's very inefficient for large data sets because it does many unnecessary comparisons and swaps.
When does bubble sort stop running?
When a full pass happens with no swaps made — this means the list is sorted.
What kind of data is bubble sort suitable for?
Very small data sets, where performance isn’t a big concern.
In bubble sort pseudocode, what does the swapped flag do?
It keeps track of whether any swaps happened in a pass.