Skip to content

Course home

Structured programming and subroutines (procedures and functions)

Structured programming and subroutines (procedures and functions)

EasyMediumHard
12345678910111213141516
Question 12

Using VB.NET, write a function to help a weather station analyze temperature records over a period of time.

The function must:

  • have the identifier countFrostyDays
  • take the number of days to analyze as an integer parameter
  • prompt the user to input the minimum recorded temperature (as an integer) for each of those days
  • count how many of those days the temperature was below 0 degrees Celsius
  • return that count.

You should use meaningful variable name(s) and VB.NET syntax in your answer.

[6]
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