Python for Kids · Class 8 · Module 4 of 9

Files and Structured Data

A spreadsheet is just text with commas in useful places.

8 sessionsSessions 25–32
4 weeksTypical pace
Foundation to IntermediateLevel
Class 8Python & Coding
A spreadsheet table with a highlighted row of records
The big idea

CSV files are the bridge between programs and the real world of data. Students read them, split rows into fields, handle the messy or missing values, calculate something meaningful and write the results back out.

Why it matters

This is the moment coding becomes directly useful for school projects, surveys and any question a student wants answered with evidence.

Unpacked

What you will actually learn

Three core ideas, each taught with worked examples and then practised until it feels obvious.

01

Text and CSV

Text and CSV are both just files; CSV simply agrees that commas separate fields and the first row usually names them.

02

Parse records

Parsing records means turning each line into usable values — splitting, stripping whitespace, converting numbers and deciding what to do with blanks.

03

Save results

Saving results means writing a new file rather than overwriting the original. Raw data is evidence; never edit it in place.

Did you know?

CSV has been in use since the 1970s and remains the most widely exchanged data format on earth — outliving dozens of formats designed to replace it.

Common mix-up

“Every row has clean data.” Real datasets contain blanks, typos, extra spaces and numbers stored as text. Handling that is most of the work.

Session by session

Your 8-session journey

Sessions 2532 of the 72-session year, at two one-hour sessions per week.

  1. 1

    Warm-up and big picture

    Where this module fits, what you will build, and a hands-on starter that gets everyone curious about text and csv.

  2. 2

    Text and CSV

    Guided teaching on text and csv, worked through together with the teacher.

  3. 3

    Text and CSV — practice lab

    Independent practice, small challenges and one deliberate mistake to diagnose.

  4. 4

    Parse records

    Guided teaching on parse records, building directly on the previous two sessions.

  5. 5

    Parse records — practice lab

    Applied tasks that combine text and csv and parse records in one piece of work.

  6. 6

    Save results

    Save results introduced and practised, completing the toolkit needed for the project.

  7. 7

    Project build

    Guided build session for the module project: Survey analyser.

  8. 8

    Test, present and reflect

    Finish, test against the checklist, present the work and explain the decisions behind it.

Project lab

Survey analyser

Every module ends with something the student built themselves and can demonstrate. This is the piece that goes into their portfolio and gets explained out loud at the end of session 32.

Try this at home

Run a ten-question survey in your class, save it as CSV, and write a program that reports the average, the most common answer and anything surprising.

It is finished when

  • It works from start to finish without breaking
  • You can explain every part of it in your own words
  • You tested it and improved at least one thing afterwards
  • Someone else used or understood it without your help

By the end of this module

Students finishing Module 4 can:

  • Explain and use text and csv without prompting
  • Explain and use parse records without prompting
  • Explain and use save results without prompting
  • Build and finish survey analyser
  • Test your own work and correct what you find
  • Talk an adult through what you made and why

Word bank

The vocabulary introduced here, in plain language:

CSV
Comma-separated values — a plain-text table format.
field
One value within a record.
data cleaning
Fixing messy values before analysing them.
Module challenge

Think you have got this?

0 XPLevel 1 · Curious Beginner

6 quick questions drawn from this module — vocabulary, the project you build, and a myth-or-fact round. Every wrong answer explains itself, so a mistake still teaches you something.

🎯 6 questions⚡ Up to 80 XP

Your child's free trial is one message away.

Tell us your child’s class and what they enjoy. We will suggest the closest program fit—no pressure and no upfront payment.