Activity 01
Think-Pair-Share: Function Identification
Present a 40-line program written without functions. Students individually identify at least three sections they would extract into named functions and choose a name for each. Pairs compare their choices and discuss where their extractions differ. The class builds a consensus version on the board.
Explain the benefits of using functions to organize code.
Facilitation TipDuring Think-Pair-Share: Function Identification, circulate and listen for students to articulate how a function’s name and purpose connect to its role in the program.
What to look forPresent students with a short Python script that repeats a block of code multiple times. Ask them to identify the repeated block and then write a new function that encapsulates this block, demonstrating how to call it in place of the original repetitions.