Skip to content
CCC Python Course

Testing

Stage
2
Module
M2.7
Lessons
1

In this module

  • Compare your program's output against the sample exactly, not just by how it looks.
  • Write test inputs beyond the sample, including a hand-made case, an edge case, and one built to check speed.
  • Recognize that the grader shows only sample feedback and per-subtask results up to the first failure, so local testing is your only view into anything beyond that.

Before this module

Lessons

  1. 1Testing

Practice

Try these on the judge. Each link opens the problem on WMOJ.

  1. 2022 J1
    Cupcake Party (opens on WMOJ in a new tab) WMOJ

    Given how many regular boxes and how many small boxes of cupcakes a group has, find how many cupcakes are left over after handing one to each of a fixed number of students.

  2. 2026 J4
    Snail Path (opens on WMOJ in a new tab) WMOJ

    Given a sequence of moves a snail makes on a grid while leaving a trail behind it, count how many times it revisits a square it has already marked.