3.2 ProgrammingLow Exam FrequencyOCR
Variable Scope
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 pick up marks when it appears in mixed-topic papers.
Study this topic
Sample 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
Exam questions for Variable Scope
Where can a local variable be accessed?
Identify and explain the scope error in this pseudocode: function calculateTotal(price, quantity) local total = price * quantity endfunction calculateTotal(10, 5) output total
18
exam-style questions
10
revision flashcards
Ready to revise Variable Scope?
Get personalised daily study plans, adaptive quizzes, and spaced repetition flashcards.
Start revising free