Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
Question 19

Write a program using either pseudocode or a high-level programming language of your choice that calculates the volume of water (in litres) required by an automated greenhouse irrigation system based on the current soil moisture percentage and the ambient temperature in degrees Celsius.

The program should:

  • Prompt the user to input the current soil moisture percentage.
  • Prompt the user to input the ambient temperature in ∘C^\circ\text{C}∘C.
  • Calculate and output the required water volume based on the following rules:
    • If the ambient temperature is less than or equal to 15∘C15^\circ\text{C}15∘C and the soil moisture percentage is less than 30%, the water volume is the moisture percentage multiplied by 0.8.
    • If the ambient temperature is greater than 15∘C15^\circ\text{C}15∘C, the water volume is the moisture percentage multiplied by 2.5.
    • Otherwise, the water volume is 0.

You should use meaningful variable names and correct programming syntax in your answer.

[7]
Markscheme

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts

298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank