pdf, 247.06 KB
pdf, 247.06 KB
pdf, 241.39 KB
pdf, 241.39 KB
pdf, 254.66 KB
pdf, 254.66 KB

Your teacher has 30 quiz papers to mark. How does a program add up the scores, find the highest and the lowest, and work out the average — in seconds? This worksheet and quiz pack teaches dictionaries and files through one real job: a quiz-scores data project. Students build a dictionary of names and scores, look values up by key, add and change pairs, and learn why asking for a missing key crashes with a KeyError. They loop through keys, values and items, add up the values, and print each name next to its score. They read a text file line by line, turn text into numbers with int(), write results to a file with “w”, add to it with “a”, and learn why files must be closed. Then they read real CSV data — ten students, scores out of 10 — and work out the total (69), the average (6.9), the highest (Finn, 10) and the lowest (Jack, 3) by hand before tracing the code that does it. The capstone project puts it all together: students write one complete program that loads scores.csv into a dictionary, works out the total, average, highest and lowest scores, prints the results and saves a summary file. Every program in the pack has been run and every output checked. The pack includes a teacher guide (objectives, success criteria, key vocabulary, timings, step-by-step teaching, differentiation, common mistakes with what to say, assessment and follow-on ideas), printable A4 student worksheets (eight tasks plus a 10-question quiz), and a full answer key with every program output verified, a quick-check card, a 114-mark scheme with grade boundaries and marking notes. It works as a KS3 computing lesson, as revision before GCSE, and as a cover lesson — every task can be done on paper by predicting and tracing code by hand, and every task can also be typed in and run on a computer. It follows on directly from Python 1, 2 and 3 in this series (first programs, lists and functions, while loops and Boolean logic). This resource was created with AI assistance and reviewed and revised by the author.

Reviews

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.