Identify errors in given algorithms and suggest: past paper questions
Real questions on identify errors in given algorithms and suggest
The newest 19 of 19 written questions. Open one to see it on the real paper.
- 0478/21 · May/June 2026 · Q5a[2]
Write the pseudocode to generate a whole random number between 1 and 1000 inclusive and store it in the variable GeneratedNumber
See it on the paper → - 0478/21 · May/June 2026 · Q11[5]
The function Power(FirstNumber, SecondNumber) returns the value of FirstNumber raised to the power of SecondNumber. FirstNumber and SecondNumber are integers. Write pseudocode statements to: • • define the function call the function with the variables A and B and store the return value in the variable Value function de...
See it on the paper → - 0478/22 · May/June 2026 · Q5a[4]
error 1 line number correction error 2 line number correction (a) Identify the line numbers of four errors in the pseudocode and suggest corrections. error 4 line number correction correction error 3 line number
See it on the paper → - 0478/23 · October/November 2025 · Q5b[2]
The algorithm does not work correctly. State the reason why the algorithm does not work as expected and explain how the algorithm could be corrected. Any code used must be fully explained. Reason Correction
See it on the paper → - 0478/23 · October/November 2025 · Q6c[6]
Write the algorithm in pseudocode.
See it on the paper → - 0478/23 · October/November 2025 · Q7a[3]
Identify the line numbers of the three errors in the pseudocode and suggest a correction for each error. Correction Error 2 line number Correction Error 1 line number Correction Error 3 line number
See it on the paper → - 0478/23 · October/November 2025 · Q9b(i)[5]
Write pseudocode statements to: • • define the procedure with the parameter store the name of the person in the file.
See it on the paper → - 0478/23 · October/November 2025 · Q9b(ii)[2]
Write the pseudocode that uses the procedure StoreData() to store the name ‘Suella’ in the file People.txt
See it on the paper → - 0478/21 · May/June 2025 · Q5[4]
Two library routines used in programming are MOD and DIV. State the purpose of each of the library routines. Give one example pseudocode statement for each of the library routines. MOD purpose Example pseudocode DIV purpose Example pseudocode
See it on the paper → - 0478/22 · February/March 2025 · Q6a[5]
Identify the line numbers of five errors in the pseudocode and suggest a correction for each error. Error 1 line number Correction Error 2 line number Correction Error 3 line number Correction Error 4 line number Correction Error 5 line number Correction
See it on the paper → - 0478/22 · February/March 2025 · Q6b[2]
Write the pseudocode statement to output the average of the numbers, rounded to two decimal places.
See it on the paper → - 0478/22 · February/March 2025 · Q6c[4]
Explain how you could change the corrected algorithm so that it also finds the smallest number that was input and outputs its value at the end. Any code used must be fully explained.
See it on the paper → - 0478/22 · February/March 2025 · Q7c(i)[3]
Explain how you would change the algorithm to prevent the problems described.
See it on the paper → - 0478/22 · May/June 2024 · Q7b[3]
the line numbers of the three errors in the pseudocode and suggest a correction for each error.
See it on the paper → - 0478/21 · October/November 2023 · Q1[1]
one box to show which operator means less than or equal to.
See it on the paper → - 0478/23 · October/November 2023 · Q5a[3]
Identify the three errors in the pseudocode and suggest corrections. Error Correction Error Correction Error Correction
See it on the paper → - 0478/23 · October/November 2021 · Q2a[4]
Find the four errors in the pseudocode and write a correction for each error. Error Correction Error Correction Error Correction Error Correction
See it on the paper → - 0478/23 · October/November 2021 · Q2b[3]
The pseudocode for this algorithm could be shortened by the use of a FOR … NEXT loop. Rewrite the algorithm using a FOR … NEXT loop.
See it on the paper → - 0478/23 · October/November 2021 · Q4[5]
The algorithm, shown by this flowchart, allows the input of examination marks for a class of students. A mark of 999 ends the process. If a mark is 40 or over then a pass grade is awarded. The number of pass grades is calculated for the whole class. If this is under 50% of the class, the class is offered extra help. ST...
See it on the paper →
What examiners said
Most candidates were able to identify the correct purpose of MOD and DIV with only a few giving the correct pseudocode for MOD and DIV.
— Examiner report, May/June 2025, 0478/21 Q5 (Cambridge)
Most candidates were able to identify most of the errors in the given code.
— Examiner report, February/March 2025, 0478/22 Q6(a) (Cambridge)
A common error seen was that some candidates did not include the OUTPUT command in their answer. This was essential as the question required the output of the rounded number.
— Examiner report, February/March 2025, 0478/22 Q6(b) (Cambridge)
Past papers, syllabus and examiner reports © UCLES (Cambridge University Press & Assessment). Questions are matched to topics from the official syllabus. AssessPro is independent and not endorsed by Cambridge.