Creating Modules (.py files to import)
A .py file becomes a module that other scripts can import to reuse its functions
What it does: After import helpers, access its functions with helpers.function_name(). 'from module import name' lets you use the name directly without the module prefix. Any .py file is a module — import it to use what's inside. Modules let you split code into files and share functions across projects. Python searches the current folder and sys.path — same folder always works. * imports all public names — generally avoided as it pollutes the namespace. A module is just a Python file — it can hold anything at the top level. Module (file) names cannot contain spaces. Use underscores: my_module.py.
Common mistakes: Don't include .py: just the module name. Module names are case-sensitive. File is helpers.py, so use helpers.
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
ModuleFill 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 →