Computer Science for IGCSE & O level - Algorithm Design And Problem Solving (Section 6)

1
Which of the following is a key feature of good algorithm design?
Answer
A
B
C
D
2
In the context of pseudocode for calculating ticket prices, what would cause the 'Discount' to be 0.2?
Answer
(C)
Number of tickets > 20
3
What is meant by the term 'modularity' in the context of algorithm design?
Answer
(B)
The decomposition of an algorithm into smaller, independent modules.
4
Which type of check would be most useful to test if someone entering a date formatted incorrectly?
Answer
(C)
Format check
5
What is the main benefit of using subroutines (or procedures) in an algorithm?
Answer
(C)
They promote code reusability and organization.
6
In the context of algorithms, what does 'efficiency' primarily refer to?
Answer
(A)
The speed at which the algorithm produces results.
7
During which phase of the program development life cycle would you write the program code?
Answer
(C)
Coding
8
What is the main goal of using a 'modular' approach in programming?
Answer
(C)
To break the code into manageable pieces to enhance code organization and reusability.
9
Which of these is an example of a selection control structure?
Answer
(C)
IF...THEN...ELSE
10
Which symbol is used to represent a decision in a flowchart?
Answer
(B)
Diamond
11
Which of the following methods involves finding the largest and smallest values in a set of data?
Answer
(C)
Finding maximum, minimum and average
12
What type of data should be used to test if a program works at the limits of what the software is designed for?
Answer
(C)
Boundary data
13
In programming, what does the term 'debugging' mean?
Answer
(B)
To fix errors or bugs in a program.
14
What is abstraction in the context of program design?
Answer
(A)
Hiding irrelevant details to focus on essential elements.
15
What is the purpose of a trace table in algorithm design?
Answer
(D)
To trace the values through an algorithm for given inputs
16
In a flowchart, which symbol is used to show the input and output?
Answer
(C)
Parallelogram
17
What is the main goal of 'testing' an algorithm?
Answer
(B)
To verify that the algorithm is correct and functioning as expected.
18
What is an appropriate check to validate the number of tickets?
Answer
(A)
Range check
19
Which of the following is NOT a component of a computer system?
Answer
(D)
Abstraction
20
What is 'Input' in the context of a computer system?
Answer
(D)
Where the system gets the data
21
What are the two types of conditional statements as mentioned in the text?
Answer
A
C
22
Which loop structure is best used when the number of iterations is known before the loop starts?
Answer
(C)
FOR ... TO ... NEXT
23
What is the purpose of a 'loop' in an algorithm?
Answer
(B)
To repeat a set of instructions.
24
What is the primary advantage of using a FOR loop over a WHILE loop?
Answer
(B)
It automatically manages a counter.
25
In a concert ticket sales example, what percentage of discount is applied when tickets are bought in bulk?
Answer
(C)
20%
26
Which of the following is an example of a control structure?
Answer
A
B
C
27
Which of the following are standard methods used in algorithm design?
Answer
A
B
C
28
What is the best approach to handle an input validation check that fails?
Answer
B
C
29
What does the term 'algorithm' mean?
Answer
(B)
A set of instructions for solving a problem.
30
What is a 'logical error' in programming?
Answer
(C)
An error that leads to unexpected results due to incorrect logic.
31
What type of error would a syntax error in an algorithm cause?
Answer
(D)
Compilation Error
32
Which data structure uses the LIFO (Last-In, First-Out) principle?
Answer
(B)
Stack
33
Which of the following are steps involved in writing and amending an algorithm?
Answer
A
B
C
D
34
What type of data validation check ensures data is within a defined range?
Answer
(D)
Range Check
35
What kind of data is typically used to identify errors in an algorithm?
Answer
(C)
Abnormal data
36
What is the purpose of a 'function' or 'procedure' in programming?
Answer
(C)
To perform a specific task or calculation.
37
What does an algorithm define?
Answer
(B)
The solution to a problem
38
What kind of errors could be discovered using trace tables?
Answer
B
C
39
What are the benefits of using functions in programming?
Answer
A
B
D
40
What is the main role of the 'REPEAT ... UNTIL' loop?
Answer
(A)
To execute code until a specific condition is true.
41
In the concert ticket sales example, what condition is checked before applying the discount?
Answer
(B)
Whether the number of tickets is greater than or equal to 20.
42
What is the purpose of a trace table in algorithm design?
Answer
(C)
To record the algorithm's state at various points.
43
What is the difference between an algorithm and a program?
Answer
(C)
An algorithm is the design or blueprint, and a program is the implementation of that design.
44
What is a 'flowchart' used for?
Answer
(B)
To represent an algorithm visually using symbols.
45
What action does the algorithm involving an alarm clock perform?
Answer
(C)
It waits for a specific time and then outputs a sound.
46
When testing a program, what is the primary objective of using "normal data"?
Answer
(A)
To determine how the program functions with common and expected inputs.
47
Which validation techniques offer a human-based review of entered data?
Answer
B
C
48
Which of the following are standard validation checks?
Answer
A
B
C
49
Which of the following is an example of a format check?
Answer
(A)
Ensuring an email address contains an '@' symbol.
50
What are some of the potential problems related to entering a date into the input data?
Answer
A
B
C
D