Question 10(b) 2023 · February-March · Paper 22 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 10
Part (b)
Question 6
Show text version of question
Question 10
Part (b)
Question 10
The variables X, Y and Z are used in a program: X stores a whole number, Y stores a decimal
number and Z stores a flag that can be set to TRUE or FALSE
Part (b)
The function Same(A,B) returns TRUE if the value of A is the same as the value of B when B
is rounded to the nearest whole number and FALSE otherwise.
Write pseudocode statements to:
- define the function
- call the function with X and Y and store the return value in Z
Function definition ....................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Function call .............................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
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_m23_qp_22.pdf
