Python for school students

Intermediate Python

The working programmer’s toolkit: functions, dictionaries, strings, nested data, filtering, search and sort, JSON-shaped records, tests, and small tools — everything that used to sit in “advanced” plus the secondary-school core.

Your progress (this browser)

0%

0 of 12 lessons complete

Level exam
  1. Lesson 1 · 38 min

    Functions — reusable recipe cards

    The chemistry lab keeps printed cards: “To make 100 ml saline, mix …”. Anyone can follow the card with different amounts. A function is that

    Start
  2. Lesson 2 · 32 min

    Dictionaries — labelled records

    A phone contact is not a nameless pile of numbers. It is a record: name, class, house. A dictionary maps keys to values — column headers in

    Start
  3. Lesson 3 · 30 min

    Strings — shaping text

    A school notice is text you clean: capitals for a banner, a name dropped into a sentence, a line split into words. Strings are not just prin

    Start
  4. Lesson 4 · 28 min

    Guarding bad input

    A canteen app must not crash if someone types a word instead of a number. You check first: if the value looks usable, calculate; else print

    Start
  5. Lesson 5 · 32 min

    Nested data — a day’s timetable

    A timetable is a list of periods, and each period is a record (subject + room). Nested lists and dictionaries model real school data. This i

    Start
  6. Lesson 6 · 30 min

    Working with a table of numbers

    The sports teacher keeps 100 m times in a register. You load them as a list, then compute fastest, slowest and average — the start of data w

    Start
  7. Lesson 7 · 36 min

    Filtering tables of readings

    A weather station logs temperatures. Engineering work is rarely one number — it is a table: keep the hot days, convert units, report. Loops

    Start
  8. Lesson 8 · 32 min

    Records as structured objects

    A lab generator has voltage, current and status. In full Python you may write a class. Here we model an object as a dictionary plus function

    Start
  9. Lesson 9 · 34 min

    Search and sort

    Finding a roll number in a messy register is linear search. Sorting times lets a coach pick medalists. You will use list.sort and pandas sor

    Start
  10. Lesson 10 · 32 min

    Structured messages (JSON-shaped dicts)

    IoT devices and web APIs speak JSON: nested dictionaries and lists. Even before import json, thinking in keys and lists is the skill. A tele

    Start
  11. Lesson 11 · 32 min

    Tests as executable specs

    A bridge formula that is never checked will fail on site. A test is a tiny program that calls your function and prints PASS or FAIL. Interns

    Start
  12. Lesson 12 · 40 min

    Mini project — library late-fee + lab board

    Two small systems share one skill: a function with a rule, then a report. The library charges ₹5 per extra day after a 7-day loan. A lab das

    Start