0% found this document useful (0 votes)
69 views1 page

Exam Paper 2 Pre

The document describes three tasks for a program to monitor water temperature in a pond: 1) Input and store temperatures taken over one day in an array, calculate the daily average, and validate temperatures; 2) Input temperatures over 5 days into separate arrays and calculate the daily averages; 3) Select the highest and lowest temperatures among the 5 days and output the days and temperatures, then calculate the weekly average.

Uploaded by

Liane Regnard
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views1 page

Exam Paper 2 Pre

The document describes three tasks for a program to monitor water temperature in a pond: 1) Input and store temperatures taken over one day in an array, calculate the daily average, and validate temperatures; 2) Input temperatures over 5 days into separate arrays and calculate the daily averages; 3) Select the highest and lowest temperatures among the 5 days and output the days and temperatures, then calculate the weekly average.

Uploaded by

Liane Regnard
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Cambridge IGCSE Computer Science

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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy