Question 8(a) 2024 · May-June · Paper 21 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 8
Part (a)
Question 8
Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Question 8
Show text version of question
Question 8
Part (a)
Question 8
Question 7
P2 6 (x2, y2) 5 B
Question 4
Question 3
P1 2 (x1, y1)
Question 1
x
The endpoints, P1 and P2, have the coordinates (3, 2) and (6, 6).
The value B2 is given by the formula:
B2 = (x1 − x2)2 + (y1 − y2)2
In this example:
B2 = (3 − 6)2 + (2 − 6)2 B2 = (–3)2 + (–4)2 B2 = 9 + 16 B2 = 25
Question 13
Part (a)
A function IsRA() will:
- take three sets of integers as parameters representing the coordinates of the three
- return TRUE if the endpoints form a right-angled triangle, otherwise return FALSE.
endpoints that form a triangle
In pseudocode, the operator ‘^’ represents an exponent, which is the number of times a value is multiplied by itself. For example, the expression Value2 may be written in pseudocode as Value ^ 2
Complete the pseudocode for the function IsRA().
FUNCTION IsRA(x1, y1, x2, y2, x3, y3 : INTEGER) RETURNS BOOLEAN
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
ENDFUNCTION
Question 14
Why this question appears here
91% assigned-topic match · Data types and structures › Data types and records
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 9618_s24_qp_21.pdf
