Paper 1 Flashcards

(39 cards)

1
Q

What is an algorithm?

A

A step-by-step set of instructions to solve a problem or perform a task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is decomposition?

A

Breaking down a problem into smaller, more manageable parts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is abstraction?

A

Removing unnecessary details to focus on what’s important.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is pseudocode?

A

A structured but informal way of writing algorithms that looks like code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a flowchart?

A

A diagram that shows the steps of an algorithm using symbols.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is structured programming?

A

A method of writing programs using sequence, selection, iteration, and subroutines to make them clear and maintainable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is linear search?

A

A method that checks each item in a list one by one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is binary search?

A

A method for searching sorted lists by repeatedly halving the search range.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which is faster for large lists: linear or binary search?

A

Binary search — but only for sorted lists.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is bubble sort?

A

A simple sorting method that compares and swaps adjacent items repeatedly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is merge sort?

A

A sorting method that splits the list into halves, sorts them, and merges the results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which sort is better for large lists?

A

Merge sort — it’s more efficient but uses more memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a variable?

A

A named location in memory that stores data that can change.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a constant?

A

A named value that does not change during the program’s execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is assignment?

A

Giving a variable a value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is iteration?

A

Repeating code using loops like FOR, WHILE, or REPEAT UNTIL.

17
Q

What is selection?

A

Making decisions in code using IF, ELSE, or ELSEIF.

18
Q

What is a subroutine?

A

A named block of code that performs a task; can be a procedure or function.

19
Q

What is a parameter?

A

A variable passed into a subroutine.

20
Q

What is a return value?

A

The result that a function gives back when called.

21
Q

What is a local variable?

A

A variable that exists only within a subroutine.

22
Q

What is an integer?

A

A whole number.

23
Q

What is a real?

A

A number with a fractional part.

24
Q

What is a Boolean?

A

A value that is either TRUE or FALSE.

25
What is a character?
A single letter, number, or symbol.
26
What is a string?
A sequence of characters.
27
What is an array?
A data structure that holds multiple values of the same type.
28
What is a record?
A data structure that holds multiple values of different types.
29
Name three arithmetic operators.
+ (add), - (subtract), / (divide), × (multiply), DIV, MOD.
30
Name three relational operators.
=, ≠, <, >, ≤, ≥
31
Name three Boolean operators.
AND, OR, NOT
32
What does string concatenation do?
Joins two strings together.
33
What does the LEN function return?
The number of characters in a string.
34
What does substring do?
Extracts part of a string.
35
What is a trace table?
A table used to track variable values as an algorithm runs.
36
Why are trace tables useful?
They help identify errors and understand how code works step-by-step.
37
What is time efficiency?
A measure of how the number of steps an algorithm takes increases with input size.
38
Which search is more efficient for large sorted data: linear or binary?
Binary search — it checks fewer items.
39
Which sort is faster for large data: bubble sort or merge sort?
Merge sort — it's more efficient overall.