Skip to content

Course home

Programming fundamentals

Programming fundamentals

EasyMediumHard
123456789101112131415161718192021222324
Question 17

An automated agricultural drone service irrigates fields based on crop type and land area:

  • Irrigating "Wheat" costs £12 per acre.
  • Irrigating "Alfalfa" costs £18 per acre.

Create a function, calculateIrrigationCost(), that takes the area in acres and the crop type as parameters, then calculates and returns the total cost to charge.

You do not have to validate these parameters.

You must use either:

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

Programming fundamentals Questions

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

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

Question bank