
Python Modules & Libraries: import, random, math & More (Cambridge IGCSE 0478, AS & A Level 9618, OCR GCSE & A Level)
Show students how to use code someone else has already written. This ready-to-use bundle introduces Python modules and libraries through the ones students use most: random, math, time and datetime. It also covers how to read documentation and how to build a simple module of their own.
Syllabus note: library routines and random number generation are part of the Cambridge 0478 and OCR GCSE content, and this pack links Python’s random and math modules to them. Wider module use, such as datetime, is extension content that supports practical programming and NEA work, and is not a required topic.
What’s included
PowerPoint presentation: step-by-step explanations with worked code examples and diagrams of how a program uses a module
Worksheet: graded tasks from importing a module to combining several in one program
Hands-on activity: a practical task such as building a dice game, quiz or simple simulation
MCQ quiz: quick questions for starters, plenaries or assessment
Full mark scheme: answers and explanations for every task, so marking is quick and consistent
Topics covered
What a module and a library are, and why programmers reuse code
Import styles: import x, from x import y and import x as z
The random module: randint(), choice(), random() and shuffle()
The math module: sqrt(), pi, floor() and ceil()
The time and datetime modules
Linking Python modules to exam pseudocode library routines such as RANDOM, ROUND, MOD and DIV
Finding and reading documentation with help() and dir()
Writing and importing a simple module of your own
Common errors, such as ModuleNotFoundError and name clashes
Why teachers like it
Zero prep: download and teach
Differentiated tasks that support all learners and stretch the more able
Fun, game-based examples that keep students engaged
Fully editable
Works for lessons, homework, revision and cover work
Suitable for
Teachers of Cambridge IGCSE Computer Science (0478), Cambridge AS & A Level (9618), OCR GCSE (J277) and OCR A Level (H446), and any beginner-to-intermediate Python course.
Please leave a review and follow my shop for more Computer Science resources!
Something went wrong, please try again later.
This resource hasn't been reviewed yet
To ensure quality for our reviews, only customers who have purchased this resource can review it
Report this resourceto let us know if it violates our terms and conditions.
Our customer service team will review your report and will be in touch.