Paper 1 Flashcards
(39 cards)
What is an algorithm?
A step-by-step set of instructions to solve a problem or perform a task.
What is decomposition?
Breaking down a problem into smaller, more manageable parts.
What is abstraction?
Removing unnecessary details to focus on what’s important.
What is pseudocode?
A structured but informal way of writing algorithms that looks like code.
What is a flowchart?
A diagram that shows the steps of an algorithm using symbols.
What is structured programming?
A method of writing programs using sequence, selection, iteration, and subroutines to make them clear and maintainable.
What is linear search?
A method that checks each item in a list one by one.
What is binary search?
A method for searching sorted lists by repeatedly halving the search range.
Which is faster for large lists: linear or binary search?
Binary search — but only for sorted lists.
What is bubble sort?
A simple sorting method that compares and swaps adjacent items repeatedly.
What is merge sort?
A sorting method that splits the list into halves, sorts them, and merges the results.
Which sort is better for large lists?
Merge sort — it’s more efficient but uses more memory.
What is a variable?
A named location in memory that stores data that can change.
What is a constant?
A named value that does not change during the program’s execution.
What is assignment?
Giving a variable a value.
What is iteration?
Repeating code using loops like FOR, WHILE, or REPEAT UNTIL.
What is selection?
Making decisions in code using IF, ELSE, or ELSEIF.
What is a subroutine?
A named block of code that performs a task; can be a procedure or function.
What is a parameter?
A variable passed into a subroutine.
What is a return value?
The result that a function gives back when called.
What is a local variable?
A variable that exists only within a subroutine.
What is an integer?
A whole number.
What is a real?
A number with a fractional part.
What is a Boolean?
A value that is either TRUE or FALSE.