Edexcel 1CP2 6.6.3: Local and global variables
The free BugBot lesson that teach this point, a robot to try it on, and the past-paper questions that test it.
Lessons that teach it
- F4.3 Local and global variables Functions and structured code
Scope: where a variable exists, and why passing values beats global.
Try it on a robot
The task from F4.3 Local and global variables, running here. Change the program and press Run.
Past paper questions on this
Real exam questions that test this, each worked through with a program you can run.
- AQA 8525 June 2024 Paper 1, Question 10: Trace three subroutines that call each other 2 marks
- AQA 8525 June 2024 Paper 1, Question 14: Local variables, and a subroutine that counts busy days and returns the count 7 marks
- AQA 8525 June 2022 Paper 1, Question 11: Complete a subroutine that works out a sound file's size, local variables, why subroutines 10 marks
- Edexcel 1CP2 June 2023 Paper 2, Question 5: A user ID: local and global names, a procedure, lower(), isdigit() and ord() 15 marks
The specification is Edexcel's own document; this page says which of our lessons teach point 6.6.3 and is not endorsed by the board.