Write an algorithm using either pseudocode or a flowchart, to: • input a positive integer • use this value to set up how many other numbers are to be input • input these numbers • calculate and output the total and the average of these numbers.
- Write an algorithm using either pseudocode or a flowchart, to: • input a positive integer • use this value to set up how many other numbers are to be input • input these numbers • calculate and output the total and the average of these numbers.[6]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2017). The mark or mark type is shown in brackets.
- 1 mark for each, there may be other solutions, award full marks for any working solution
- any six from:
- initialise total (outside loop)
- Input number of numbers (outside loop with validation)
- Loop using input value
- Input number (inside loop)
- Update Total (inside loop)
- Calculate average
- Print average and total (outside loop)
- Sample algorithm:
- INPUT NumberCount
- Total ← 0
- FOR Count ← 1 TO NumberCount
- INPUT Number
- Total ← Total + Number
- NEXT
- Average ← Total/NumberCount
- PRINT Total, Average
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →