Video Lesson

Part of Variable Scope · Section 1 of 7

Study NotesUnit: 3.2 ProgrammingGCSE

This study notes covers Video Lesson within Variable Scope for GCSE Computer Science. Revise Variable Scope in 3.2 Programming for GCSE Computer Science with 18 exam-style questions and 10 flashcards. This topic appears less often, but it can still be a useful differentiator on mixed-topic papers. It is section 1 of 7 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.

Practice questions for Variable Scope

Where can a local variable be accessed?

  • A. Anywhere in the program
  • B. Only within the subprogram where it is declared
  • C. Only in the main program body
  • D. In any subprogram that calls the original subprogram
1 markfoundation

Identify and explain the scope error in this pseudocode: function calculateTotal(price, quantity) local total = price * quantity endfunction calculateTotal(10, 5) output total

2 marksstandard

Quick recall flashcards

What is variable scope?
Where a variable can be accessed in the code
What is a global variable?
A variable declared outside all subprograms, accessible anywhere in the program

18 questions on Variable Scope — practise free

Instant marking, adaptive difficulty and spaced-repetition flashcards — all aligned to your exam board.

Start revising free →