Designing, creating and refining algorithms
14
0/6

A local council wants a program to manage a smart recycling bin system with 5 bins.

Write an algorithm in pseudocode or a high-level programming language that implements the following design requirements:

  • Initialize a counter for full bins to 0.
  • Loop 5 times (representing bins 1 to 5).
  • In each iteration, prompt the user to input the fill level (as an integer percentage, 0 to 100) for the current bin.
  • If the fill level is 90 or above, output 'Bin [number] is FULL' (where [number] is the current bin number) and add 1 to the full bins counter.
  • Otherwise, output 'Bin [number] has space'.
  • After the loop finishes, output the total number of full bins with an appropriate message.
[6]

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