Skip to content
MathsGenie logo
Open app

Course home

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

Programming concepts

EasyMediumHard
12345678910111213141516171819202122232425262728293031323334353637
Question 23

Write a Python program that calculates the daily water allowance (in litres) for a greenhouse zone based on the average daily temperature and the soil moisture level.

The program should:

  • Prompt the user to input the average daily temperature in degrees Celsius (as a whole number).
  • Prompt the user to input the soil moisture level as a percentage (as a whole number).
  • Calculate and output the daily water allowance based on the following criteria:
    • If the soil moisture level is less than or equal to 30 and the average daily temperature is greater than 25, the daily water allowance will be the average daily temperature multiplied by 8.
    • If the soil moisture level is greater than 30, the daily water allowance will be the average daily temperature multiplied by 3.
    • In all other cases, the daily water allowance will be 0.

You should use syntax correct for Python, proper indentation, and meaningful variable names.

[7]

Programming concepts Questions

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