GCSE – Lesson 20 – Scope
Learners will be introduced to the concept of scope in this lesson. They will be briefed on the definitions, before being given example programs that show how local and global scope work in Python. There is an activity where learners will convert programs that use global variables into programs that pass values through parameters instead. This demonstrates that passing values through parameters can reduce the need for global variables. Learners will be then introduced to constants and how these work in Python before completing a lesson quiz.
Learning objectives
- Describe scope of variables
- Describe how parameters can reduce the need for global variables
- Identify when to use global variables
- Describe a constant
Package contents
- Lesson plans
- Slide decks
- Learner resources
- Homework
Don't have an account?
GCSE revision
A comprehensive range of content and helpful practice questions are also available for this topic.
View on Ada Computer ScienceEnjoyed teaching these lessons? Found a mistake?
Fill in a short form to give feedback on these resources.