Skip to content
Computing · JC 1

Active learning ideas

Programming Fundamentals and Python

Active learning helps students connect abstract programming concepts to concrete actions. By writing, debugging, and explaining code together, they move beyond memorizing syntax to understanding how logic shapes behavior. This hands-on work builds confidence and reveals misconceptions early, when they are easiest to correct.

MOE Syllabus Outcomes9569 2.1.1 Use sequence, selection and iteration constructs9569 2.1.2 Write modular programs using functions
25–40 minPairs → Whole Class3 activities

Activity 01

Peer Teaching30 min · Pairs

Peer Teaching: Code Review Circles

Students exchange their solutions to a programming logic puzzle. They must use a checklist to identify 'code smells' like global variables or redundant loops and suggest improvements to their peer's work.

How do sequence, selection, and iteration control program flow?

Facilitation TipDuring Code Review Circles, provide a rubric that focuses on clarity, modularity, and correctness to guide peer feedback.

What to look forProvide students with three code snippets. For each snippet, ask them to: 1. Identify the data type of each variable used. 2. Write down one example of what could be stored in that variable. 3. Explain in one sentence why the variable name is or is not descriptive.

UnderstandApplyAnalyzeCreateSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 02

Inquiry Circle40 min · Small Groups

Inquiry Circle: The Function Factory

Groups are given a large task, like calculating a student's GPA. They must work together to decide how to break this into smaller, reusable functions, defining exactly what inputs and outputs each function needs before writing any code.

Why is modular programming important?

Facilitation TipFor The Function Factory, assign each group one function to dissect and improve, then rotate so all teams contribute.

What to look forAsk students to write a two-line Python program. The first line should prompt the user for their favorite color and store it in a variable. The second line should print a message including that color. Observe students' use of input() and string concatenation.

AnalyzeEvaluateCreateSelf-ManagementSelf-Awareness
Generate Complete Lesson

Activity 03

Simulation Game25 min · Whole Class

Simulation Game: Variable Scope Role Play

Assign students roles as 'Global Space' or 'Function A.' Use physical containers to represent variables. Students must pass messages and values, demonstrating how a variable inside a function cannot be seen by the global space unless returned.

How do we handle exceptions and errors in Python?

Facilitation TipIn Variable Scope Role Play, assign roles explicitly so observers can see how changes in one scope affect others.

What to look forPose the following scenario: 'Imagine you are writing a program to calculate the average score of students in a class. What data type would you use for the total score, and what data type would you use for the number of students? Explain your choices and why using the wrong data type might cause problems.'

ApplyAnalyzeEvaluateCreateSocial AwarenessDecision-Making
Generate Complete Lesson

A few notes on teaching this unit

Start with small, focused tasks that build toward larger programs. Use live coding to model problem-solving, including mistakes and corrections. Research shows that students learn best when they see experts struggle and recover. Avoid overwhelming them with long lectures; instead, let them practice in short, structured bursts.

Students will write code that is modular, readable, and correct. They will explain their choices clearly and revise based on feedback. You will see evidence of this in peer discussions, clean function definitions, and thoughtful variable names.


Watch Out for These Misconceptions

  • During Code Review Circles, watch for students who argue that global variables are acceptable because they seem simpler to use.

    Have them trace a bug where one function accidentally overwrites a global variable, causing another function to fail. Use the provided code snippets to show how scoping rules protect against unintended side effects.

  • During The Function Factory, watch for students who combine multiple tasks into one long function to save space.

    Ask them to map each step of their complex function to a separate function. Use the activity’s worksheet to highlight how smaller functions are easier to test, document, and reuse.


Methods used in this brief