Skip to content
MathsGenie logo
Open app

Course home

  1. GCSE
  2. Computer Science AQA
  3. Question bank

Programming concepts

EasyMediumHard
12345678910111213141516171819202122232425262728293031323334353637
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]

Programming concepts Questions

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