Past-paper question · 2025 May-June · Paper 22 · Q10

Question 10 2025 · May-June · Paper 22 · 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 answer for Question 10

✓
Due to an issue with this question, the question has been removed from the

Question 15

✓
question paper.

Mark scheme 0478_s25_ms_22.pdf →

Show text version of question

Question 10

A
program is required to allow students to calculate the volume of a number of standard

three-dimensional shapes. It will use functions to allow other shapes to be added in the future.

Cuboid height volume = base × depth × height

depth

base

Triangular prism

volume = 1 2 × base × depth × height height

depth base

Sphere

volume = 4 3 × Pi × radius × radius × radius radius Pi is a constant with value 3.142

Write a program that meets the following requirements:

  • Output a menu to ask the user for an input to indicate the shape for which a volume needs to

be calculated, from the three shapes given or if they want to stop the program. The program must validate the input.

  • Input the data needed to calculate the volume of the chosen shape, based on the given
  • formulae.

  • Create one function for each shape to calculate and return the volume using the given
  • formulae. Each function uses the input data as parameters.

  • Output the volume in the main program, rounded to two decimal places.

The program continues until the user inputs the stop option from the menu.

You must use pseudocode or program code and add comments to explain how your code works.

All variables and constants used must be declared for this algorithm.

All inputs and outputs must contain suitable messages.

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

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

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

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 › Programming concepts

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_s25_qp_22.pdf

Keep practising this topic