Which stage of the program development life cycle (PDLC) involves identifying and fixing logic errors or syntax errors found in the program code?
Cambridge IGCSE · Computer Science (0478)
Algorithm design and problem-solving: Practice Questions
5 multiple-choice questions marked as you go, and 5 written questions with worked solutions. All on Algorithm design and problem-solving.
Consider the following pseudocode snippet:
Total ← 0
FOR k ← 1 TO 5 STEP 2
Total ← Total + k
NEXT k
What is the final value of Total?
An algorithm processes an array MyArray containing the initial values [12, 5, 18, 7, 10] indexed from \(1\) to \(5\).
X ← \(0\)
FOR i ← \(1\) TO \(4\)
IF MyArray[i] > MyArray[i+1] THEN
MyArray[i+1] ← MyArray[i+1] + MyArray[i]
ELSE
MyArray[i+1] ← MyArray[i+1] DIV \(2\)
X ← X + MyArray[i+1]
ENDIF
NEXT i
What will be the final values of X and MyArray[5] after this algorithm has finished executing?
A library management system uses a database to store book details. Which of the following describes a verification method that could be used during data entry?
A program requires a user to enter a percentage value between \(0.0\) and \(100.0\) inclusive. The developer is preparing test data for the range check.
According to the syllabus definitions, which set of values represents extreme data for this range?
Identify the stage of the program development life cycle that involves the use of abstraction and decomposition to define the requirements of a problem.
Write your answer out first, then check it against the worked solution.
Explain how a structure diagram is utilized during the design stage of the program development life cycle to visually represent the concept of decomposition.
Write your answer out first, then check it against the worked solution.
A program accepts an input \( X \) where \( 1 \le X \le 100 \). Identify one piece of abnormal test data and the two boundary values for the lower limit.
Write your answer out first, then check it against the worked solution.
A teacher uses a program to store student test scores. The scores are whole numbers between \(0\) and \(100\) inclusive.
(a) Identify the most appropriate basic data type for a variable used to store a single test score.
(b) During the testing phase, the teacher uses different types of test data to ensure the program handles inputs correctly. Describe Normal and Abnormal test data, providing a specific example for each using the range \(0\) to \(100\).
(c) State the name of the standard algorithm used to find if a specific score (for example, \(95\)) exists within an unsorted array of scores.
Write your answer out first, then check it against the worked solution.
Consider the following pseudocode algorithm that processes an array of numbers named Scores[1:6] containing the initial values [12, 45, 8, 30, 50, 22]:
Total ← 0
Count ← 0
FOR Index ← 1 TO 6
IF Scores[Index] MOD 2 = 0 THEN
Total ← Total + Scores[Index]
Count ← Count + 1
ELSE
Total ← Total - 2
ENDIF
NEXT Index
(a) What is the final value of Total after the algorithm completes?
(b) What is the final value of Count?
Write your answer out first, then check it against the worked solution.
* The content provided by thinka is generated by AI and may not always be accurate or up-to-date. Please use it as a supplementary resource and verify with official materials.
You've seen the model answer. Now get yours marked.
This page can show you how a good answer looks. It cannot tell you what your answer was missing. thinka marks your written work against the real mark scheme in about 15 seconds.
Want more questions like these? Get a fresh set on this topic, graded as you go.
Practice More