Note AcademyNote Academy

Computer Science · May / June 2024 · Paper 21 · Question 2

0478

As printed in the paper

The question as text

Four descriptions of programming concepts and five programming concepts are shown.

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 2(a)[4]

    One mark for each correct line

    Description Programming concept

    function

    a subroutine that may not return a value

    procedure

    a value that is declared and used within

    a specific procedure

    parameter

    a value that a procedure expects you to

    supply when it is called

    global variable

    a subroutine that will always return a

    local variable

    value

  • 2(b)[2]

    One mark per mark point

    Correct key word - CALL
    Procedure name with correct parameters - Average(25, 50)

    CALL Average(25, 50)

  • 2(c)[3]

    One mark per mark point, max three

    Procedures / functions divide the program into smaller manageable segments
    … making it more readable / easier to understand / easier to debug
    Procedures / functions with meaningful names help to provide documentation for the program / enable/help/provide abstraction
    Procedures and functions may be re-used (in the program / in other programs / as part of a library) / run from a single line
    Procedures and functions can reduce / eliminate (repeated) code

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.