The Tide Station: Python Drills
0 of 12 stars
Introduction
The Tide Station
A volunteer weather station on the pier logs tide heights, wind and rain. The readings arrive as numbers and sometimes as messy text, and the volunteers want a few small tools to make sense of them.
Each drill gives you a function to write. Run checks your code against the examples. Submit adds hidden tests.
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.
Your Python
Editor
Press Control or Command and Enter to run the examples. Press Shift, Control or Command and Enter to submit. Press Escape, then Tab to leave the editor.
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.