AQA A-level Computer Science (7517)Specification point 4.1.1.14

AQA 7517 4.1.1.14: Global variables in a programming language

The free BugBot lesson that teach this point, a robot to try it on, and the past-paper questions that test it.

What it covers

At GCSE you met local and global variables (F4.3) and the tools of an IDE (F6.6). At A level you need two ideas for every variable, its scope and its lifetime, the reasons local variables are good practice, and how the debugging tools of an IDE find the errors that scope mistakes cause.

  • Scope and lifetime
  • Shadowing, and changing a global
  • Why local variables are good practice
  • Debugging tools
Read the free lesson (20 min)

Or do it in the simulator, with tasks that mark themselves

Lessons that teach it

  1. A1.5 Scope, lifetime and debugging in an IDE Programming techniques and object-oriented programming
    Local and global variables, why locals are good practice, and breakpoints, stepping, watches and tracebacks.

Try it on a robot

The task from A1.5 Scope, lifetime and debugging in an IDE, running here. Change the program and press Run.

The specification is AQA's own document; this page says which of our lessons teach point 4.1.1.14 and is not endorsed by the board.