Activity 01
Pair Programming: Basic Calculator
Pairs write a program prompting for two numbers and user-selected operation (+, -, *, /). Compute and display results, handling division by zero with a message. Pairs test each other's code and swap to extend with modulus.
Compare how numbers and strings are handled differently in Python operations.
Facilitation TipDuring Pair Programming: Basic Calculator, circulate and ask each pair to verbalize their next operation before typing, forcing explicit thinking about types.
What to look forPresent students with a series of Python code snippets. Ask them to predict the output for each snippet, specifically noting any that might produce a TypeError and explaining why. For example: `print('Hello' + ' ' + 'World')` vs `print('Score: ' + 100)`.