ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions

Higher Computing Science 2026 Question 3

2 marks · Sub-programs, parameters and scope

Formal and actual parameters are used in the code below. Line 1 FUNCTION discount(REAL price, REAL percentage) RETURNS REAL Line 2 DECLARE discountAmount AS REAL INITIALLY 0.0 Line 3 SET discountAmount TO price * (percentage/100) Line 4 SET price TO price − discountAmount Line 5 RETURN price Line 6 END FUNCTION … … Line 66 SET newPrice TO discount(originalPrice, discountRate) Identify one formal parameter and its associated actual parameter. Formal parameter Actual parameter

Marking scheme

Formal Actual price originalPrice percentage discountRate Award 2 marks for correct pair. Award 1 mark for one correctly identified formal/actual.

Previous question: Higher Computing Science 2026 Question 2

Next question: Higher Computing Science 2026 Question 4