Computer Science (AS & A Level) · May / June 2024 · Paper 21 · Question 6
9618
As printed in the paper
The question as text
Three points on a grid form a triangle with sides of length A, B and C as shown in the example: 10 y x 9 8 7 6 5 4 1 0 2 3 4 5 6 7 8 9 10 A C B 3 2 1 A triangle is said to be right-angled if the following test is true (where A is the length of the longest side): A2 = B2 + C2 A2 means A multiplied by A, for example 32 means 3 × 3 which evaluates to 9 You can calculate A2, B2 and C2 by using the coordinates of the endpoints of each line. For example, B2 is calculated as follows: 10 y x 9 8 7 6 5 4 1 0 2 3 4 5 6 7 8 9 10 B P2 P2 P1 P1 3 2 1 (x1, y1) (x1, y1) (x2, y2) (x2, y2) 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
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
6(a)[6]
6(b)[2]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

