Activity 01
Pair Programming: Linear Search Code-Off
Pairs write a Python function for linear search on an unsorted list. Test with 5 inputs: found early, found late, not found. Swap codes to debug partner's version and note comparisons.
Explain the process of a linear search algorithm.
Facilitation TipDuring Pair Programming: Linear Search Code-Off, assign roles clearly—one student types while the other reads and checks each line against the traced steps from the Small Groups activity.
What to look forProvide students with a small unsorted list of numbers (e.g., [15, 8, 23, 4, 42, 16]) and a target number (e.g., 42). Ask them to write down the sequence of comparisons the linear search would make and state the final index returned.