Edexcel IGCSEGeneralGeneral Applications3 Marks
A programmer wants to write an algorithm to calculate the sum of 10 numbers.
- (a)State the name of the programming construct used to repeat the process of adding numbers.[1]
- (b)Describe two differences between a WHILE loop and a FOR loop.[2]
Mark scheme
Marking points from the official mark scheme. The mark or mark type is shown in brackets.
- 4(a) Iteration / Loop / Repetition (1) B1
- 4(b) Up to two of: B1 for each correct difference
- FOR loop repeats for a fixed number of times / WHILE loop repeats until condition is met (1)
- FOR loop has a counter / WHILE loop does not (1)
- FOR loop condition is usually based on a counter / WHILE loop condition is usually based on other variables (1)
- FOR loop usually has an end point (implied fixed number of times) / WHILE loop may never terminate if condition never met (1)
- WHILE loop tests the condition before execution / FOR loop does not (usually) (1)
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 →