Activity 01
Pair Programming: Build Return Functions
Pairs write three functions: one returning a single sum, one a tuple of min and max from a list, and one without return to observe None. Test by calling in a main script and printing results. Discuss differences in output.
Evaluate scenarios where a function should return a value versus performing an action.
Facilitation TipIn Pair Programming, ask partners to switch roles after every three function definitions so both students practise writing return statements under live peer feedback.
What to look forPresent students with three function snippets. Ask them to identify which function should return a value, which should perform an action, and which implicitly returns None. For the 'return' examples, ask what data type the return value is.