Cambridge 9618 A Level Computer Science · Year 13

Paper 4 — Practical Programming

Your home lessons. Each one teaches a skill, lets you try it here in the browser, then asks you to reproduce it in Python and evidence it back to me on Teams.

Before you start

How these lessons work

Paper 4 is sat at a computer and it is worth 25% of the A Level. You cannot learn it by reading, so every lesson makes you type.

The pattern, every time

  1. Learn on the page. Predict what code will do, run it here in the browser, then pick it apart. Nothing to install.
  2. Build it in Python on your own machine. IDLE, Thonny or VS Code — exactly as you will in the exam.
  3. Evidence it. Paste your code as text and your screenshots into the Evidence Document from the Teams assignment, and submit it.

The mark schemes are on these pages

Every lesson carries its own mark scheme, hidden behind a reveal. Open it after you have attempted the task, not before — marking your own work honestly against the real wording is most of the point. A tick you did not earn costs you in June, not now.


Unit 20.1

Object-Oriented Programming

A class appears in every Paper 4 since June 2021 — all 29 papers. This is not an optional topic — it is roughly a third of the paper, every single year. Six lessons, in the order the marks are actually being lost.


Still to come

The rest of the practical strand

Alongside OOP, abstract data types and file handling appear in every Paper 4. Sorting and searching appear in almost every paper, and recursion in more than half of recent series. They will be added here as we reach them. The badge on each card is the syllabus section.

  • 19.1
    Abstract Data Types
    Stacks, queues, circular queues, linked lists, binary trees and hash tables — always built from the design you are given, never from memory.
    Coming
  • 19.1
    Sorting and Searching
    Bubble sort, insertion sort, linear and binary search — written from the algorithm, with every field of a record moved together.
    Coming
  • 19.2
    Recursion
    Base case first, a return on every path, and converting between recursive and iterative versions.
    Coming
  • 20.2
    File Handling and Exception Handling
    The five-line skeleton: try, open, loop to the end of the file, close, and catch the exception with a message.
    Coming

If something does not work

Troubleshooting

  • The Python box says "Python unavailable". The page downloads Python the first time you open it, so it needs an internet connection, and on the school network it may be blocked. Everything else on the page still works — write the code in IDLE or Thonny instead, which is what the assessed task needs anyway.
  • It is slow to load the first time. Python is a few megabytes. Give it twenty seconds; after that your browser keeps it.
  • Nothing happens when I press Run. Check the status text next to the button says "Python ready" first.
  • The page seems stuck and the status says "Still running". Your program is probably in a loop that never ends. Press Stop, fix the loop, and run it again — nothing else on the page is affected.
  • My program uses input(). Type the values it will ask for in the Program input box under the code, one per line, in order. They appear in the output just as they would in a console.
  • Where did my work go? Your code and predictions are saved in the browser you used. They will not follow you to a different computer or browser, so the Evidence Document is still the thing you submit.
  • I am stuck on the task. Drop to the Scaffolded tier on the lesson page. If you are still stuck, submit what you have with a note saying where — that is far more useful to me than an empty submission.