Past-paper question · 2023 May-June · Paper 21 · Q11

Question 11 2023 · May-June · Paper 21 · 15 marks

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

Official answer for Question 11

✓
Read the whole answer:

Question 15

✓
Check if each requirement listed below has been met. Requirements may be met using a suitable built-in function from the
✓
programming language used (Python, VB.NET or Java).
✓
On place a SEEN mark if requirement met, cross if no attempt seen, omission mark and/or comment if partially met (see
✓
marked scripts).
✓
Use the tables for AO2 and AO3 below to award a mark in a suitable band using a best fit approach, then add up the total:
✓
AO2 (maximum 9 marks)
✓
AO3 (maximum 6 marks)
✓
Data structures required:
✓
The names underlined must match those given in the scenario:
✓
Arrays or lists Days[], Readings[], AverageTemp[]
✓
Variables
✓
WeekLoop, DayLoop, InTemp, TotalDayTemp, TotalWeekTemp, AverageWeekTemp
✓
Requirements (techniques):
✓
R1 Input and store hourly temperatures and validation of input temperatures for each day (with prompts, range check and
✓
(nested)iteration)
✓
R2 Calculate, round to one decimal place and store daily average temperatures and calculate the weekly average
✓
temperature rounded to one decimal place (iteration, totalling and rounding)
✓
R3 Convert all average temperatures to Fahrenheit (to one decimal place) and output the average temperatures in both
✓
Celsius and Fahrenheit. Output with appropriate messages. (output and rounding)
✓
2210/21
✓
Cambridge O Level – Mark Scheme
✓
May/June 2023
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 2210_s23_ms_21.pdf →

Show text version of question

Question 11

A
one-dimensional (1D) array Days[] contains the names of the days of the week. A

two-dimensional (2D) array Readings[] is used to store 24 temperature readings, taken once an hour, for each of the seven days of the week. A 1D array AverageTemp[] is used to store the average temperature for each day of the week. The position of any day’s data is the same in all three arrays. For example, if Wednesday is in index 4 of Days[], Wednesday’s temperature readings are in index 4 of Readings[] and Wednesday’s average temperature is in index 4 of AverageTemp[] The temperature readings are in Celsius to one decimal place. Temperatures can only be from

  • 20.0 °C to +50.0 °C inclusive.

Write a program that meets the following requirements: • input and validate the hourly temperatures for one week • calculate and store the average temperature for each day of the week • calculate the average temperature for the whole week • convert all the average temperatures from Celsius to Fahrenheit by using the formula Fahrenheit = Celsius * 9 / 5 + 32 • output the average temperature in Celsius and in Fahrenheit for each day • output the overall average temperature in Celsius and in Fahrenheit for the whole week. You must use pseudocode or program code and add comments to explain how your code works. You do not need to declare any arrays, variables or constants; you may assume that this has already been done. All inputs and outputs must contain suitable messages. All data output must be rounded to one decimal place. You will need to initialise and populate the array Days[] at the start of the program. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..........................................................................................................................................................

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 2210_s23_qp_21.pdf

Keep practising this topic