Skip to content

Course home

Defensive design

Defensive design

EasyMedium
12345678910
Question 9

The temperature of a medication fridge needs to be input and validated. The temperature is entered in degrees Celsius (°C) and must be between 2.0 and 8.0 inclusive.

Write an algorithm to:

  • take the temperature as input
  • output "VALID" or "INVALID" depending on the temperature input.

You must use either:

  • OCR Exam Reference Language, or
  • A high-level programming language that you have studied.
[3]
Markscheme

Defensive design Questions

  1. GCSE
  2. /Computer Science
  3. /Defensive design

14 exam-style questions on OCR GCSE Computer Science Defensive design. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank