Skip to content
Technologies · Year 5

Active learning ideas

Branching Logic: If-Then-Else Decisions

Active learning works for branching logic because students need to physically trace and manipulate decision paths to see how conditions control program flow. Moving their bodies and materials to represent 'if-then-else' branches helps them internalize that only one path is taken, not both.

ACARA Content DescriptionsAC9TDI6P04
25–45 minPairs → Whole Class4 activities

Activity 01

Escape Room35 min · Pairs

Pair Programming: Obstacle Course

Students pair up to code a sprite that uses if-then-else to dodge obstacles: if touching red block, turn left; else, go forward. Partners alternate coding and testing, then modify for new conditions. End with a class showcase.

Explain how conditional statements guide a program's flow.

Facilitation TipDuring Pair Programming: Obstacle Course, circulate and ask each pair to verbally explain their condition and predicted path before testing, using sentence frames like 'When __, the program will __.'

What to look forProvide students with a simple flowchart for a program that uses 'if-then-else'. Ask them to write down the output of the program for two different starting inputs, explaining how the conditions were met or not met.

RememberApplyAnalyzeRelationship SkillsSelf-Management
Generate Complete Lesson

Activity 02

Escape Room45 min · Small Groups

Small Groups: Quiz Brancher

Groups build a multiple-choice quiz where correct answers advance with praise, incorrect ones loop back with hints via if-then-else. Test on peers, record scores, and refine logic based on feedback.

Design a scenario where 'if-then-else' logic is essential for a program's function.

Facilitation TipWhile Small Groups work on Quiz Brancher, provide printed flowcharts so students can mark the executed path with highlighters as they test inputs.

What to look forPresent students with a scenario, such as 'A robot needs to water plants.' Ask them to write down an 'if-then-else' statement that the robot could use, specifying the condition, the 'then' action, and the 'else' action.

RememberApplyAnalyzeRelationship SkillsSelf-Management
Generate Complete Lesson

Activity 03

Escape Room25 min · Whole Class

Whole Class: Traffic Controller

Project a shared program where class votes on conditions for a traffic light: if timer over 30 seconds, change color; else, stay. Students suggest tweaks live, observing flow changes together.

Evaluate the impact of changing a condition on a program's outcome.

Facilitation TipFor Whole Class: Traffic Controller, assign roles clearly—one student controls the condition input, another traces the flowchart, and a third runs the program to verify predictions.

What to look forAsk students to share a program they created or observed. Prompt them to explain: 'Where in this program does the code make a decision? What condition is being checked, and what happens if that condition is true versus false?'

RememberApplyAnalyzeRelationship SkillsSelf-Management
Generate Complete Lesson

Activity 04

Escape Room30 min · Individual

Individual: Choice Adventure

Each student codes a story with branching paths: if choose 'left', show cave scene; else, forest. Run through all paths, debug alone, then pair to exchange and play.

Explain how conditional statements guide a program's flow.

Facilitation TipIn Individual: Choice Adventure, require students to submit a flowchart before coding to ensure they plan the decision structure first.

What to look forProvide students with a simple flowchart for a program that uses 'if-then-else'. Ask them to write down the output of the program for two different starting inputs, explaining how the conditions were met or not met.

RememberApplyAnalyzeRelationship SkillsSelf-Management
Generate Complete Lesson

A few notes on teaching this unit

Teach branching logic by starting with concrete, relatable scenarios students can act out with their bodies or manipulatives. Avoid abstract theory early on; instead, use flowcharts and step-by-step tracing to build understanding. Research suggests that students grasp conditional logic better when they debug misconceptions in real time, so provide immediate feedback during hands-on tasks rather than after full program completion.

Successful learning looks like students confidently explaining which branch executes for given conditions, tracing code step-by-step without skipping steps, and designing multiple scenarios with varied conditions. They should connect conditions to actions and predict outcomes before testing.


Watch Out for These Misconceptions

  • During Pair Programming: Obstacle Course, watch for students who assume both branches execute simultaneously.

    Have pairs physically stand in two lines representing each branch, then mark the executed path with a cone or arrow before running the program to test their prediction.

  • During Small Groups: Quiz Brancher, watch for students who only test equality conditions.

    Provide a list of varied operators (>, <, =) and require groups to test at least two different operators in their quiz questions before finalizing.

  • During Whole Class: Traffic Controller, watch for students who believe the order of conditions doesn’t matter.

    Use a flowchart on the board and physically rearrange the 'if-then' blocks to show how moving an 'else' clause changes which action executes.


Methods used in this brief