
Technology • Year 10 • 75 • 24 students • Created with AI following Aligned with National Curriculum for England
create a lesson plan for year 10 compute science exam board OCR - on subroutines - scope 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
This lesson aligns with the OCR GCSE (9-1) Computer Science specification, specifically:
By the end of this lesson, students will be able to:
def greet():
message = "Hello!" # Local variable
print(message)
greet()
print(message) # This will cause an error
Teacher explanation (5 minutes):
Python demonstration (5 minutes) – Contrast poor vs. good practice:
# Using a global variable (Not recommended)
name = "Alice"
def greet():
print("Hello, " + name)
greet()
# Using a parameter instead (Better practice)
def greet(name):
print("Hello, " + name)
greet("Alice")
Think-Pair-Share (5 minutes) – students rewrite an example with unnecessary global variables to use parameters instead.
PI = 3.14159 # Constant (usually written in uppercase)
def circle_area(radius):
return PI * radius * radius # Cannot change PI
print(circle_area(5))
PI written in uppercase? What happens if we try to change it?This lesson follows UK education standards and is structured to engage students using multiple teaching methods—including discussion, coding, collaboration, and hands-on coding challenges. 🚀
Join thousands of teachers using Kuraplan AI to create personalized lesson plans that align with Aligned with National Curriculum for England in minutes, not hours.
Created with Kuraplan AI
🌟 Trusted by 1000+ Schools
Join educators across United Kingdom