Activity 01
Pair Programming: Simple Calculator
Pairs write a program that prompts for two numbers and an operation, then outputs the result using formatted print statements. They test with various inputs, including invalid ones, and add error handling. Switch roles midway to review code.
Design a program that interacts with the user through input and output.
Facilitation TipDuring Pair Programming: Simple Calculator, circulate to ensure both partners share the keyboard, alternating roles every 5 minutes to keep both engaged.
What to look forPresent students with a code snippet that has an error in input handling or output formatting. Ask them to identify the error and write the corrected line of code, explaining their reasoning.