Coding · Grade 9
Collections and Structured Data
Using a school clubs fair, learners work with Python's four core collections: lists (slicing, comprehensions, enumerate), tuples (immutable records and unpacking), sets (uniqueness and set operations) and dictionaries (lookup, counting, grouping and nested data). They reason about mutability, aliasing and copies, and choose the right collection for each job.
- 4 lessons
- About 90 minutes
- Check what you learned: 8 questions
- Ways to answer: choose an answer, put code in order, trace code, match pairs, type a number and sort into groups
What learners will discover
- Use lists with slicing, comprehensions, enumerate and common methods.
- Use tuples for fixed records and sets for unique members and set operations.
- Use dictionaries for lookup, counting and grouping, including nested structures.
- Reason about mutability, aliasing and copies, and choose an appropriate collection for a task.
Lessons
-
Lists in depth 6 steps3 practiceabout 22 min
-
Tuples and sets 5 steps3 practiceabout 20 min
-
Dictionaries and nested data 5 steps3 practiceabout 22 min
-
Mutability, aliasing and choosing a collection 5 steps3 practiceabout 20 min
-
Check what you learned 8 questions at the end
Keep exploring
More 9th grade coding
- 9th Grade Coding Worksheets10 printable worksheets
Guide for grown-ups
- How to start homeschooling: a step-by-step guide for familiesA guide for parents · 7 min read