Exam Paper 2 Pre
Exam Paper 2 Pre
Introductionpaper
Exam-style to the Teacher’s Resource
Paper 2: Pre-release
Write and test a program to complete the three tasks.
A class is monitoring the temperature of water in a pond during the day. The temperature
is taken every 30 minutes between 8:30 a.m. and 4:00 p.m. inclusive. The temperatures are
entered into an array.
Task 1
Input and store the temperatures taken over the course of one day. You must store the
temperatures in a one-dimensional array. Calculate and output the average temperature of
the day. All temperatures must be validated on entry (between -5 degrees and 35 degrees)
and any invalid temperatures rejected.
Task 2
The temperature is to be recorded over 5 days. Input and store the temperatures taken over
the 5 days. Each day must be stored in an individual one-dimensional array. Calculate and 1
output the average temperature for each day.
Task 3
Select the day with the highest and lowest temperatures, and output the day and
temperature for each. Calculate and output the average temperature for the week.