Past-paper question · 2023 October-November · Paper 23 · Q10

Question 10 2023 · October-November · Paper 23 · 15 marks

Original past-paper question for 10
Original past-paper question for 10
Original past-paper question for 10
Reveal official mark-scheme answer Official mark-scheme answer for 10

Official answer for Question 10

✓
AO2 (maximum 9 marks)

Question 15

✓
•
✓
AO3 (maximum 6 marks)
✓
Data Structures required names shown underlined must be used as given in the scenario
✓
2D Array or list Temperatures
✓
Variables MaxDay, MinDay, AvDay, MaxWeek, MinWeek, AvWeek
✓
Requirements (techniques)
✓
R1 Find maximum and minimum temperatures for each day and calculates the average daily temperature (searching,
✓
totalling)
✓
R2 Find maximum and minimum temperatures for week and calculates the average weekly temperature (nested
✓
searching, totalling)
✓
R3 outputs for each day name, the rounded values for maximum temperature, minimum temperatures and average
✓
temperature. Outputs for the week the rounded values for maximum temperature, minimum temperatures and average
✓
temperature (output with appropriate messages and rounded values)
✓
Example 15-mark answer in pseudocode:
✓
// meaningful identifier names and appropriate data structures to store the data required
✓
DECLARE DayCounter, HourCounter : INTEGER
✓
DECLARE AvDay, AvWeek, MaxDay, MinDay, MaxWeek, MinWeek : REAL
✓
DECLARE DayTotal, WeekTotal : REAL
✓
DECLARE Day : STRING
✓
CONSTANT Hours 24
✓
CONSTANT Days 7
✓
Cambridge IGCSE – Mark Scheme
✓
0478/23
✓
October/November 2023
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks
✓
MaxWeek -1000// initialise max and min temperatures and total for the week

Mark scheme 0478_w23_ms_23.pdf →

Show text version of question

Question 10

A
weather station takes temperature readings once an hour for a week. These temperatures are

stored in a two-dimensional (2D) array Temperatures[] Each column contains 24 readings for a single day. The first temperature is recorded at 00:00 and the final temperature at 23:00. There are seven columns, one for each day of the week, starting with Monday and ending with Sunday.

The variables MaxDay, MinDay and AvDay are used to store the maximum, minimum, and average temperatures for a day. The variables MaxWeek, MinWeek and AvWeek are used to store the maximum, minimum, and average temperatures for the week.

The array has already been set up and the data stored.

Write a program that meets the following requirements:

  • finds the maximum and minimum temperatures for each day
  • calculates the average temperature for each day
  • outputs for each day:
  • name of the day, for example Monday
  • maximum temperature
  • minimum temperature
  • average temperature
  • finds the maximum and minimum temperatures for the week
  • calculates the average temperature for the week
  • outputs:
  • maximum temperature for the week
  • minimum temperature for the week
  • average temperature for the week.

All temperatures output must be rounded to two decimal places.

You must use pseudocode or program code and add comments to explain how your code works. All inputs and outputs must contain suitable messages.

You do not need to declare any arrays or variables; you may assume that this has already been done. You do not need to initialise the data in the array Temperatures[]

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Question 15

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Question 16

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..................................................................................................................................................

[15]

reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

Topic relevance

Why this question appears here

98% assigned-topic match · Programming › Arrays

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 0478_w23_qp_23.pdf

Keep practising this topic