Activity 01
Pair Programming: Type Challenges
Pairs create variables for each data type and write code to perform operations, such as adding two integers or concatenating strings. They input user data with input() and convert types using int() or str() to avoid errors. Pairs then swap scripts to test and debug each other's code.
Justify why it is important for a computer to know if data is a number or text.
Facilitation TipDuring Pair Programming: Type Challenges, circulate to listen for partners explaining why their code crashed, turning run-time errors into teachable moments.
What to look forPresent students with a list of values (e.g., 42, 3.14, 'Python', True, '100'). Ask them to write down the most appropriate Python data type for each value and justify their choice in one sentence.