Ninth graders use if / elif / else to make a program choose a path. Python checks the conditions top to bottom and runs the FIRST one that is true. They order a grade-checker, then build a branching program of their own.
Students will be able to…
How does a program choose between several paths?
Project this and have students put the if / elif / else branches in the order Python checks them.
Tap any phase to open the teacher moves and student actions.
How could a program turn a score into a letter grade?
Students use conditionals.
Students modify.
Students create.
Students close.
Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students.
Iteratively develop programs using conditionals.
Combine control structures to express ideas in code.
Evaluate and refine computational artifacts.
Use logic to build solutions.
Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.
Have students write a 3-branch if/elif/else for a real decision. A printable conditionals worksheet is in the Computer Science library.
Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.
A quick self-check with instant feedback, drawn from this lesson’s key terms.
A print-and-go review sheet with a built-in answer key. Tap “Show answer key” to reveal answers, or print the clean version for students.