Activity 01
Pair Programming: Shape Area Functions
Pairs design two functions, one for rectangle area and one for triangle area, using parameters for length, width, base, and height. They call functions with varied inputs, incorporate return values into a main program that prints results, and test edge cases like zero values. Pairs demo one function to the class.
Explain the benefits of using functions in programming.
Facilitation TipDuring Pair Programming: Shape Area Functions, pair students with mixed prior experience so they can model collaboration and debugging for each other.
What to look forProvide students with a short Python code snippet containing a function definition and a function call. Ask them to identify: 1. The function name. 2. Any parameters. 3. The argument passed when the function is called. 4. What the function is expected to do.