Algorithm Verification and Development · CAPE Computer Science Unit 1
35 past-paper questions on Algorithm Verification and Development, part of Problem-Solving with Computers, from every CAPE Computer Science Unit 1 paper on Quelpr.
- 3(c)(i)2 marks· CAPE Computer Science Unit 1 · 2009 · Paper 2Based on the algorithm shown, what are the final values stored in variables c and j when execution terminates?
- 3(c)(ii)6 marks· CAPE Computer Science Unit 1 · 2009 · Paper 2Referring to specific line numbers, identify and correct the errors in the algorithm so that it generates, prints, and counts the odd numbers between 1 and 99 inclusive.
- 3(c)(iii)1 mark· CAPE Computer Science Unit 1 · 2009 · Paper 2Using the corrected algorithm, state the final value of variable c at the end of execution.
- 4(b)11 marks· CAPE Computer Science Unit 1 · 2009 · Paper 2Trace through the execution of the given algorithm and draw the exact output produced, using '-' to represent spaces printed by printSpaces(n).
- 4(c)8 marks· CAPE Computer Science Unit 1 · 2009 · Paper 2Write an algorithm that uses repetition to find the sum of all multiples of 7 between 14 (inclusive) and 126 (inclusive).
- 3(d)9 marks· CAPE Computer Science Unit 1 · 2010 · Paper 2Amend the algorithm in Figure 1 to include an additional choice 'cherry' and keep a count of errors made (incorrectly spelt or not one of the three choices), displaying the error counter just before the algorithm…
- 4(a)11 marks· CAPE Computer Science Unit 1 · 2010 · Paper 2Trace through the execution of the given algorithm and draw the exact output generated.
- 4(b)8 marks· CAPE Computer Science Unit 1 · 2010 · Paper 2Write an algorithm that uses iteration to find the sum of all multiples of 3 and all multiples of 4 between 3 (inclusive) and 150 (exclusive).
- 3(c)8 marks· CAPE Computer Science Unit 1 · 2011 · Paper 2By referring to the specific line number, identify and correct the errors in the given algorithm designed to print a table of squares of all even numbers between 1 and 100 inclusive.
- 4(b)11 marks· CAPE Computer Science Unit 1 · 2011 · Paper 2Trace through the execution of the given algorithm and draw the exact output generated, using a dash '-' to represent spaces printed by printSpaces(n).
- 4(c)(i)8 marks· CAPE Computer Science Unit 1 · 2011 · Paper 2Write an algorithm that uses iteration to print the sum of ALL multiples of 11 (integers) between 0 and 5 000, inclusive.
- 6(e)(i)4 marks· CAPE Computer Science Unit 1 · 2011 · Paper 2Show the output generated by the given nested for-loop code segment.
- 3(c)(i)5 marks· CAPE Computer Science Unit 1 · 2012 · Paper 2Write an algorithm to find and print the number of students that voted for EACH of the colours: red, blue, green.
- 3(c)(ii)5 marks· CAPE Computer Science Unit 1 · 2012 · Paper 2Write an algorithm to find and print the TOTAL number of students that voted for red, blue or green.
- 3(d)7 marks· CAPE Computer Science Unit 1 · 2012 · Paper 2Write an algorithm that uses iteration to find the sum of all multiples of 4 and all multiples of 7 between m (inclusive) and n (inclusive) where m and n are two positive integers entered via the keyboard, assuming n >…
- 4(b)3 marks· CAPE Computer Science Unit 1 · 2012 · Paper 2Given the input data line '3 2 1 5 7 4', determine what the provided algorithm would print. Show your working.
- 4(c)10 marks· CAPE Computer Science Unit 1 · 2012 · Paper 2Trace through the execution of the provided algorithm and draw the output exactly as generated, noting the definitions of printSpaces, print, and println.
- 3(b)6 marks· CAPE Computer Science Unit 1 · 2013 · Paper 2A cellular company charges
1.50 per minute for the first 10 minutes and0.50 per minute for any additional minutes. Write an algorithm that reads an integer value representing the number of minutes used for voice… - 4(a)11 marks· CAPE Computer Science Unit 1 · 2013 · Paper 2Trace through the execution of the algorithm provided and draw the output exactly as generated.
- 4(b)8 marks· CAPE Computer Science Unit 1 · 2013 · Paper 2Write an algorithm to find the product of all multiples of 6 between 12 (inclusive) and 600 (exclusive).
- 6(c)6 marks· CAPE Computer Science Unit 1 · 2013 · Paper 2Determine the exact output produced when the given C program is executed.
- 3(b)(i)5 marks· CAPE Computer Science Unit 1 · 2014 · Paper 2The number of students that voted for EACH of the subjects: Mathematics, English, Spanish.
- 3(b)(ii)5 marks· CAPE Computer Science Unit 1 · 2014 · Paper 2The TOTAL number of students that voted for Mathematics, English or Spanish.
- 3(c)9 marks· CAPE Computer Science Unit 1 · 2014 · Paper 2Write an algorithm that uses iteration to find the sum of all multiples of six and all multiples of seven between 100 and 250 exclusive. Use one variable, for example, sumMult, to accumulate the sum of the multiples of…
- 4(a)(i)6 marks· CAPE Computer Science Unit 1 · 2014 · Paper 2Construct an algorithm to print the product name, the discount for that product followed by the new price.
- 4(a)(ii)6 marks· CAPE Computer Science Unit 1 · 2014 · Paper 2Construct an algorithm to print the TOTAL amount of product discounts overall. If the total amount of discounts is greater than $500, print "Discounts exceeded."
- 4(c)7 marks· CAPE Computer Science Unit 1 · 2014 · Paper 2What would the algorithm print given the line of input data below? (Clearly show how you arrived at your answer.) 5 3 2 6 12 4
- 6(c)11 marks· CAPE Computer Science Unit 1 · 2014 · Paper 2What output is produced by the following C program? (For the output state the values of i and j at each stage.)
- 3(c)8 marks· CAPE Computer Science Unit 1 · 2015 · Paper 2Identify and correct FOUR errors in the algorithm by referencing their specific line numbers.
- 3(d)7 marks· CAPE Computer Science Unit 1 · 2015 · Paper 2Write an algorithm using iteration to calculate the sum of all multiples of 8 and all multiples of 11 between m (inclusive) and n (exclusive), where m and n are positive integers input by the user and n > m.
- 4(a)12 marks· CAPE Computer Science Unit 1 · 2015 · Paper 2Trace the execution of the provided pseudocode algorithm and display the exact output generated.
- 6(b)9 marks· CAPE Computer Science Unit 1 · 2015 · Paper 2Determine the exact output produced by the given C program.
- 3(a)15 marks· CAPE Computer Science Unit 1 · 2016 · Paper 2Write an algorithm to read the customer data and determine the total outstanding fines for each customer, the total fines paid under category N and under category P, the overall total fines paid, the total number of…
- 3(c)6 marks· CAPE Computer Science Unit 1 · 2016 · Paper 2Write an algorithm to calculate the sum of all multiples of 7 between 21 and 210 inclusive.
- 4(b)6 marks· CAPE Computer Science Unit 1 · 2016 · Paper 2A communications company charges
1.25 per minute for the first 20 minutes and0.25 per minute for any additional minutes. Write an algorithm that reads an integer representing call duration in minutes, then calculates…