Browse tools

Open House Day: Python Drills

Python DrillsSet B: Open House Day

0 of 20 stars

Introduction

Open House Day

The community centre is holding an open house. Volunteers need an RSVP list that hides email addresses, a ticket checker at the door, a restock list for the supply shelf, and a way to count what is on display in the museum wing.

Each drill gives you a function (or a class) to write. Run checks your code against the examples in the task. Submit checks it against the examples and a set of hidden tests, and tells you which one broke.

Python runs in this browser through Pyodide. Nothing you type is sent anywhere. The reference answers ship with the page, so this is for practice, not assessment.

How it works

  • Each drill asks for one function, or one class. Write it in the editor. The starter code names it for you.
  • Run calls your code on the examples shown in the task and lists what each call returned.
  • Submit also runs hidden tests and a few checks on how the code is written, such as no loops in a recursion drill.
  • Stars: one for a correct answer, and a second for solving it without hints or a worked answer.
  • Python runs in this browser. Your code and progress stay on this device. A runaway loop is stopped after ten seconds.

Want to explore without a checker? Open the Scratchpad, which has a Python shell on the same runtime.