Activity 01
Pair Programming: Grade Calculator Function
Pairs design a function that takes student name, scores list, and weight as parameters, returning average grade and pass/fail status. They test with sample data, then swap and improve partner's code. Discuss efficiency in parameter choices.
Design a function that requires multiple parameters to perform its task.
Facilitation TipDuring Pair Programming: Grade Calculator Function, have students alternate roles every 10 minutes to keep both partners engaged in both thinking and typing.
What to look forPresent students with a scenario: 'A function needs to calculate the area and perimeter of a rectangle.' Ask them to write the function signature, including appropriate parameter names and the return type (e.g., a tuple). Then, ask them to write the code for the function body.