Activity 01
Pair Coding: Operator Challenge
Pairs write Python scripts using all arithmetic operators to solve problems like calculating area, volume, and remainders. They then modify with assignment operators to update variables iteratively. Pairs test and swap codes to debug each other's work.
Differentiate between integer division and floor division operators.
Facilitation TipDuring Pair Coding, circulate and listen for students to explain their operator choice aloud before they run the code.
What to look forPresent students with a Python code snippet containing a mix of arithmetic and assignment operators, for example: `x = 10; y = 3; z = x * y + x // y ** 2`. Ask them to write down the final value of 'z' and explain the steps taken to arrive at the answer, referencing operator precedence.