Community
Community resources
Computer science Worksheets and Python Workspaces shared by Coding Pathway teachers. Worksheets cover exam board theory as well as programming. Read any of them in full here. Teachers can copy one into their own lessons and edit it before setting it to a class.
Planning a whole course or unit? Our mapped pages put the teaching sequence in order with the Worksheets that cover it: OCR GCSE Computer Science (J277), Pearson Edexcel GCSE Computer Science (1CP2), OCR A Level Computer Science (H446), Python Turtle for Key Stage 3.
- 438 resources
- 3 teachers sharing
- Creative Commons licensed
File handling Worksheets
4 resources match. Newest first. Opening a resource shows the whole thing, with answers and marking held back.
1CP2-CT-9.3 Files strings lists and subprograms integrated solution
Part 3 · 1CP2-CT-9 · Testing, structures and integrated solutions
Integrated programs are easier to reason about when decomposed. This worksheet uses a fictional CSV schema name,score, for example Asha,17. File input produces strings, so numeric score text must be converted before arithmetic or comparison. Students will: - follow data from a CSV file into converted list values - decompose processing into a focused subprogram - calculate and return a result from supplied records - design tests for the integrated solution Inside: 5 explanation cells, 1 fill-in-the-blanks cell, 3 multiple-choice questions, 3 written answers and 1 Python task. 19 marks, about 45 minutes. Series: 1CP2-CT-9 · Testing, structures and integrated solutions, part 3 of 4.
Worksheet1CP2-CT-10.3 From CSV file to structured solution
Part 3 · 1CP2-CT-10 · Integrated programming and data structures
The supplied clubs.csv uses the schema name,club,score, for example Asha,Robotics,68. Reading produces text. The loader must split each line, convert score to integer and append one typed row to a two-dimensional list. Students will: - load and convert records from the supplied CSV file - decompose file, structure and processing stages - write a parameterised function over typed rows - format and test the required result Inside: 5 explanation cells, 1 fill-in-the-blanks cell, 3 multiple-choice questions, 3 written answers and 1 Python task. 19 marks, about 45 minutes. Series: 1CP2-CT-10 · Integrated programming and data structures, part 3 of 5.
WorksheetSeries · 5 parts1CP2-CT-5 · Merge sort, files and authentication
Includes 1CP2-CT-5.3 Reading CSV text files
The file reading worksheet, following connect, read and close on a real comma-separated file. Students will: - open a file in read mode and close it deliberately - predict what successive read calls return - explain why a further read past the end returns an empty string - read every line of a file in a loop - compare readline, readlines and a for loop over the file Inside: 7 explanation cells, 3 multiple-choice questions, 2 Python tasks, 1 fill-in-the-blanks cell and 2 written answers. 15 marks, about 45 minutes. Series: 1CP2-CT-5 · Merge sort, files and authentication, part 3 of 7.
WorksheetJ277 2.2.3 File handling
Part 2 · J277 2.2.3 · Applied programming
Persistent storage taught in OCR Exam Reference Language first, then the same open, read, write and close operations in runnable Python. Students will: - explain why a file keeps data that a variable does not - use open, readLine, writeLine and close in the right order - read every line of a file using endOfFile in a loop - carry the same operations across into Python, with the mode strings supplied - write a file-handling procedure that uses the parameters it is given Inside: 8 explanation cells, 2 runnable Python tasks, 1 multiple-choice question, 3 fill-in-the-blanks cells and 1 written answer. 21 marks, about 45 minutes. Series: J277 2.2.3 · Applied programming, part 2 of 5.