Designing, creating and refining algorithms
13
0/4

An algorithm is designed to determine if a given hour of the day (expressed as an integer H H\,H from 0 to 23) qualifies for a 'Super-Off-Peak' electricity discount.

The discount is applied every 4th hour starting from hour 0 (i.e. hour 0, 4, 8, 12, 16, 20). This means that if the hour H H\,H divided by 4 has a remainder of 0, the consumer qualifies for the 'Super-Off-Peak' rate; otherwise, they pay the 'Standard' rate.

The flowchart for this algorithm is incomplete.

An incomplete flowchart diagram.

Complete the flowchart by matching the correct statements to the placeholders [ 1 ], [ 2 ], [ 3 ], and [ 4 ].

Choose from the following statements:

  • OUTPUT "Standard Rate"
  • OUTPUT "Super-Off-Peak Rate"
  • INPUT H
  • H MOD 4 == 0?
[4]

Designing, creating and refining algorithms Questions

Practise OCR GCSE Computer Science Designing, creating and refining algorithms with exam-style questions for GCSE Computer Science. 50 questions, matched to the OCR GCSE Computer Science (J277) specification and written in Component 01 and Component 02 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Designing, creating and refining algorithms Questions

  1. GCSE
  2. /Computer Science
  3. /Designing, creating and refining algorithms