Activity 01
Pair Programming: Grade Classifier
Pairs write a program that reads a numerical grade and uses if-else chains to output letter grades (A, B, C, etc.). They test with edge cases like 100 or 59, then swap computers to extend with nested checks for pass/fail. Pairs demo one unique feature to the class.
Analyze how 'if-else' structures enable programs to respond to different conditions.
Facilitation TipDuring Pair Programming: Grade Classifier, assign roles explicitly—one student writes while the other observes and asks, 'What happens if the input is exactly 50?' to keep both engaged.
What to look forPresent students with a short code snippet containing an if-else structure and a specific input value. Ask them to predict the output of the program and explain their reasoning step-by-step, focusing on how the condition is evaluated.