Question 11 2024 · February-March · Paper 22 · 15 marks
Reveal official mark-scheme answer
Official answer for Question 11
Question 15
- AO2 (maximum 9 marks)
- AO3 (maximum 6 marks)
Show text version of question
Question 11
Students in a class are recording the amount of time in minutes spent in front of a screen for each day of the week.
The one-dimensional (1D) array StudentName[] contains the names of the students in the class.
The two-dimensional (2D) array ScreenTime[] is used to input the number of minutes on each day spent in front of a screen.
The position of each student’s data in the two arrays is the same. For example, the student stored at index 10 in StudentName[] and ScreenTime[] is the same.
The variable ClassSize contains the number of students in the class.
Write a program that meets these requirements:
- allows all the students to enter their daily minutes of screen times for the past week
- calculates the total number of minutes of screen time for each student in the week
- counts, for each student, the number of days with more than 300 minutes of screen time
- calculates the average weekly minutes of screen time for the whole class
- finds the student with the lowest weekly minutes of screen time
- outputs for each student:
- name
- total week’s screen time in hours and minutes
- number of days with more than 300 minutes of screen time
- outputs the average weekly minutes of screen time for the whole class
- outputs the name of the student with the lowest weekly screen time.
You must use pseudocode or program code and add comments to explain how your code works. All inputs and outputs must contain suitable messages.
Assume that the array StudentName[] and the variable ClassSize already contain the required data.
You do not need to declare any arrays or variables; you may assume that this has already been done.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
Question 15
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
Question 16
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
...................................................................................................................................................
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.
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_m24_qp_22.pdf
