Skip to content

Course home

Structured programming and subroutines (procedures and functions)

Structured programming and subroutines (procedures and functions)

EasyMediumHard
12345678910111213141516
Question 15

Develop a subroutine that analyzes the crop health and harvesting status of an agricultural plot on a digital grid.

The subroutine should:

  • have a sensible identifier
  • take a 2D array named cropField as a parameter
  • work out and output how many crops have already been harvested (represented by the character 'H' in the grid)
  • work out how many diseased crops (represented by the character 'D') are remaining and:
    • if 0, then output 'Field healthy'
    • if 1, 2, 3, or 4, then output 'Infection low'
[11]
Markscheme

Structured programming and subroutines (procedures and functions) Questions

  1. GCSE
  2. /Computer Science
  3. /Structured programming and subroutines (procedures and functions)

131 exam-style questions on AQA GCSE Computer Science Structured programming and subroutines (procedures and functions). Each one has a worked solution and a mark scheme showing where the marks go.

Question bank