Edexcel GCSE Computer Science

2.3.5: understand the need for, and how to use, global and local variables when implementing subprograms

Keywords:
Programming
Test your self on these keywords and definitions using the games below or Play random game
KeywordDefinition
Global variablea variable that can be accessed from any part of the code because it was declared outside any sub program
Local variablea variable that can only be accessed inside the sub program where it was declared.
Scopethe part of a program where you can access a variable or constant
Sub programa part of a program (procedure or function) that has its own scope
Keyword games:
Resources: