Skip to content
Technologies · Year 8

Active learning ideas

Conditional Logic: If/Else Statements

Active learning works well for conditional logic because students need to see branches execute, not just hear about them. Watching code paths play out in real time helps students grasp why only one branch runs, making abstract concepts concrete.

ACARA Content DescriptionsAC9TDI8P03
30–50 minPairs → Whole Class4 activities

Activity 01

Escape Room45 min · Pairs

Pair Programming: Quiz Game Builder

Pairs use a block-based editor to create a quiz with if/else for scoring answers correct or incorrect, adding else for retries. Test with classmates, then swap roles to modify questions. Record scores to discuss condition accuracy.

Analyze how different conditions alter the execution path of a program.

Facilitation TipDuring Pair Programming: Quiz Game Builder, ask each pair to swap partners after completing one quiz question to share debugging strategies.

What to look forProvide students with a simple scenario, like 'If it is raining, take an umbrella, otherwise wear sunglasses.' Ask them to write the corresponding if/else pseudocode. Then, ask: 'What happens if the condition is false?'

RememberApplyAnalyzeRelationship SkillsSelf-Management
Generate Complete Lesson

Activity 02

Escape Room50 min · Small Groups

Small Groups: Debug Challenge Circuit

Provide buggy if/else code snippets for traffic lights or vending machines. Groups trace execution paths on paper first, then code fixes and run tests. Share one fix with the class via demo.

Construct a scenario where an if/else statement is the most appropriate control flow mechanism.

Facilitation TipIn Small Groups: Debug Challenge Circuit, require groups to submit a corrected code snippet and a written explanation before moving to the next challenge.

What to look forPresent students with a short block-based code snippet containing an if/else statement. Ask them to predict the output for two different inputs. For example, 'If score > 10, then display 'Win', else display 'Try Again'.' What displays if score is 15? What displays if score is 8?

RememberApplyAnalyzeRelationship SkillsSelf-Management
Generate Complete Lesson

Activity 03

Escape Room35 min · Whole Class

Whole Class: Scenario Storyboard

Project a real-world problem like a robot sorter. Class brainstorms conditions, votes on if/else structures, then codes a shared program. Run simulations and vote on improvements.

Evaluate the impact of incorrect conditional logic on program behavior.

Facilitation TipFor Whole Class: Scenario Storyboard, assign roles such as 'condition writer,' 'code tester,' and 'path tracer' to ensure participation.

What to look forPose the question: 'Imagine you are designing a program to sort fruits. You have apples and oranges. How would you use an if/else statement to decide where to put an apple?' Facilitate a brief class discussion on their proposed conditions and outcomes.

RememberApplyAnalyzeRelationship SkillsSelf-Management
Generate Complete Lesson

Activity 04

Escape Room30 min · Individual

Individual: Personal Decision Tree

Students code an if/else tree for daily choices, like outfit selector based on weather input. Test with varied inputs, note path changes, and reflect in a log.

Analyze how different conditions alter the execution path of a program.

What to look forProvide students with a simple scenario, like 'If it is raining, take an umbrella, otherwise wear sunglasses.' Ask them to write the corresponding if/else pseudocode. Then, ask: 'What happens if the condition is false?'

RememberApplyAnalyzeRelationship SkillsSelf-Management
Generate Complete Lesson

A few notes on teaching this unit

Teach conditional logic by having students act as the 'computer' first, physically moving based on conditions written on cards. This builds foundational understanding before transitioning to code. Avoid long lectures about syntax; instead, let errors surface naturally during hands-on work. Research shows students retain logic better when they debug their own flawed conditions.

Students should confidently trace if/else paths for simple conditions and explain why only one branch executes. They should also identify missing conditions or incorrect comparisons that lead to silent failures.


Watch Out for These Misconceptions

  • During Pair Programming: Quiz Game Builder, watch for students who assume both branches of an if/else statement always run.

    Have pairs add print statements at the start of each branch and run multiple test cases to observe that only one branch executes per input.

  • During Small Groups: Debug Challenge Circuit, watch for students who confuse assignment (=) with equality (==) in conditions.

    Ask groups to manually test their conditions with sample inputs and document why == must be used for comparisons, not =.

  • During Whole Class: Scenario Storyboard, watch for students who think else covers all unmet conditions automatically.

    Require groups to draft conditions for all possible outcomes and identify any gaps that leave cases unaddressed.


Methods used in this brief