Coding · Grade 10
Collections and Algorithmic Patterns
Using real-world-style air-quality, loan and sales data, learners recognise and apply the core collection patterns (accumulate, count, filter, map, any/all, find-first and best-by-key), group and index data with dictionaries and zip, and use sliding windows and two pointers to avoid repeated work. They finish by testing each pattern's characteristic edge cases, including testsuite activities against hidden buggy versions.
- 4 lessons
- About 90 minutes
- Check what you learned: 8 questions
- Ways to answer: choose an answer, trace code, match pairs, type a number, write tests and true or false
What learners will discover
- Recognise and apply accumulate, count, filter, map, any/all, find-first and best-by-key patterns.
- Group, count and index data with dictionaries, and combine sequences with zip.
- Apply sliding-window and two-pointer patterns and explain why they save work.
- Choose a pattern and test its characteristic edge cases.
Lessons
-
Core patterns over collections 6 steps3 practiceabout 22 min
-
Grouping, frequency and parallel data 5 steps3 practiceabout 20 min
-
Sliding windows and two pointers 5 steps3 practiceabout 22 min
-
Choosing and testing patterns 4 steps3 practiceabout 18 min
-
Check what you learned 8 questions at the end
Keep exploring
More 10th grade coding
- 10th Grade Coding Worksheets11 printable worksheets
Guide for grown-ups
- How to start homeschooling: a step-by-step guide for familiesA guide for parents · 7 min read