A programmer wants to test that the readings from 2000 electricity meters are greater than 400 units and less than 900 units. The programmer uses selection and repetition statements as part of the program. Explain, using programming statements, how selection and repetition could be used in this program.
- A programmer wants to test that the readings from 2000 electricity meters are greater than 400 units and less than 900 units. The programmer uses selection and repetition statements as part of the program. Explain, using programming statements, how selection and repetition could be used in this program. Selection Repetition[4]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2018). The mark or mark type is shown in brackets.
- [1] Selection use of IF statement to check the values of the meter readings
- [1] IF Reading > 400 and Reading < 900 THEN
- [1] Repetition use of FOR loop to check all 2000 meter readings
- [1] FOR Meter = 1 TO 2000 ... NEXT
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 →