
File processing lesson for IB Diploma Computer Science (first assessment 2027), with editable PowerPoint slides, a student worksheet and full answers. File processing means opening, reading, writing and closing files in a program so data lasts after it stops, including handling errors.
Written for the 2027 IB Computer Science guide, unit B2 Programming. Everything is editable, so you can adapt it to your class.
What’s included- PowerPoint lesson (12 slides) with speaker notes on every slide
- Student worksheet (Word), ready to print or edit
- Answer sheet (Word) with model answers for every question
By the end of the lesson students can:
- Explain why programs need to store data in files
- Open, read, write and append to text files in Python
- Handle file errors and close files safely
Worksheet sections: A. Recall; B. Predict the file; C. Write the code; D. Handle errors; E. Challenge
Every lesson includes- Learning goals and a starter question
- Clear explanations with worked examples (Python where code is needed)
- A quick check and a “your turn” task linked to the worksheet
- An exit ticket
- PowerPoint (.pptx) and Word (.docx), fully editable
- Works in PowerPoint and Google Slides
- Calm pastel design, consistent across the whole IB course
These are independent resources written for the IB Diploma Programme Computer Science guide (first assessment 2027). They are not produced or endorsed by the International Baccalaureate Organization.
More lessons in this series- Previous lesson: Writing recursive algorithms – IB Computer Science lesson
- Next lesson: Fundamentals of OOP – IB Computer Science lesson
- Save with the bundle: Programming – IB Computer Science (16 lessons)
Last updated: November 2026.
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.