Tuples – Practical Use
Tuples group related fixed values, return multiple values from a function, and can be used as dictionary keys
What it does: Using enum members makes comparisons self-documenting. Looping over an enum yields each member in definition order. An invalid enum name raises AttributeError; a mistyped string silently passes. if status == Status.ACTIVE: is clearer and safer than if status == 'active':. auto() assigns the next available integer so you don't need to number each member manually. Enum members are hashable (immutable) so they work as dict keys and set members. Use enums when you have a defined list of valid options that won't change. Size.SMALL is the key — looking it up returns the value 5.
Common mistakes: Compare with enum member, not string: prevents typos. String key typo passes silently. Enum key would cause clear error.
Free printable worksheet with full answer key — or add this module to a journey and assign it to your class.
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
auto()Fill in the Blanks
Spot the Error
Create a free class, add this module to a journey, and track who's stuck.
Create a free teacher account →No credit card. No setup fee. Make a class and invite students in under three minutes.
Practice this topic interactively, track progress, and unlock badges.
Start Learning Free →