Activity 01
Pair Programming: Grade Calculator
Pairs code a program that takes a score input and uses nested if-else if-else to output letter grades (A-F) with boundary checks. They test edge cases like 100 or 0, then swap roles to extend with pass/fail logic. Discuss improvements.
How do selection statements allow a program to exhibit intelligent behavior?
Facilitation TipDuring Pair Programming: Grade Calculator, circulate and ask each pair to explain which branch their code will take for a given score before they run it.
What to look forProvide students with a short Python code snippet containing an 'if-elif-else' structure and specific variable values. Ask them to write down the final output of the program and explain their reasoning step-by-step.