GCSE - Python File Handling (OCR NEA preparation)
In this lesson, students learn about file handling commands in Python, through a poem activity. The task is to create a program to read three poems from three different text files, and pick random lines from each poem to create a new one, which they have to write in a new file.<br />
<br />
This lesson helps prepare students for their Non-Exam Assessment.<br />
<br />
There are mini-tasks (match-up with extensions) that students can do before delving into the poem activity, to familiarise themselves with the file handling commands.<br />
<br />
Students are provided with the worksheets and a PowerPoint slide with the file commands for easy reference (this can be emailed or printed and handed to them). The bundle also includes the text files that contain the poems, these can be emailed or provided to students before they start the main task.<br />
<br />
The lesson PPT includes notes to help non-specialist teachers, as well as clear Learning Objectives. <br />
The lesson can also be taught to high-ability KS3 students, depending on the level of their programming skills.