Computer Science Flashcards
7 cards from real GCSE practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Computer Science flashcards as text
What is an algorithm?
Answer: A step-by-step set of instructions designed to solve a problem
An algorithm is a finite, ordered sequence of well-defined instructions used to solve a problem or complete a task.
Which of the following best describes a 'for loop' in programming?
Answer: It executes a block of code a specific number of times
A for loop iterates a block of code a predetermined number of times, controlled by a counter variable.
What does 'decomposition' mean in computational thinking?
Answer: Breaking a complex problem into smaller, more manageable sub-problems
Decomposition is the process of breaking a large, complex problem into smaller parts that are easier to understand and solve.
Which sorting algorithm works by repeatedly comparing and swapping adjacent elements that are in the wrong order?
Answer: Bubble Sort
Bubble sort passes through the list repeatedly, swapping neighboring elements until the entire list is sorted.
What is an array in programming?
Answer: A data structure that stores multiple values of the same type under one name
An array stores a collection of elements of the same data type, accessed using an index.
What is the purpose of using functions (subroutines) in a program?
Answer: To group reusable blocks of code that can be called multiple times
Functions allow programmers to write a block of code once and call it whenever needed, promoting reusability and reducing repetition.
What is the output of the following pseudocode? x ← 10 x ← x * 2 x ← x - 5 OUTPUT x
Answer: 15
x starts at 10, is multiplied by 2 to give 20, then 5 is subtracted leaving 15.