Skip to content

Global and local variables in programs

Lesson 6 / 13

Lesson video

The video is not available yet.

Lesson slides

not available yet

Lesson details

Lesson outcome

I can explain the difference between a local and global variable.

Show transcript
The scope of a variable determines where it can be accessed. A local variable is a variable that is only accessible within a specific part of a program. A global variable can be accessed anywhere in a program for the duration of the program's execution.

Worksheet

not available yet

Quizzes

This quiz is not available yet.

What pupils see

The same lesson as a pupil sees it. You can set any section as work on its own.

  • IntroductionPrepare · Not available
  • Starter quizActivate · Not available
  • Lesson videoLearn · Not available
  • Exit quizCheck · Not available
This content is by Cashar and published under an open licence.