Learning objectives

Distinguish local from global variables and predict output when the same identifier appears in a sub-routine and in the main program

Explain what happens to a local variable and to a parameter when a sub-routine ends

Define and call a procedure with a parameter (up to three are allowed) and explain why passing a value in is better than relying on a global

Choose meaningful identifiers for variables, constants, arrays and sub-routines, write comments that explain purpose and rules, and justify each change when rewriting a program

Continue with a revision plan

These learning objectives are available to everyone. Sign in with an eligible plan to read the full note and worked examples.