Examples
Bigger programs to read and pull apart. Run them here, then open your own copy in the playground.
Python
- A sales report from a CSVRead a school tuck shop's sales from CSV text with the csv module, skip bad rows, then print totals, a best seller and a text bar chart.DonePremium
- A loot tableHow games pick a random drop: weighted chances, a seeded random generator so the results repeat, and a tally of a thousand drops.Done
- A tiny text adventure engineRooms in a dictionary, an inventory list and a command parser, driven by a fixed list of commands so you can watch a whole playthrough.DonePremium
Web
- A habit-streak trackerHow streak apps work: turn a list of check-in dates into current and best streaks per habit, with real date maths.DonePremium
- A reaction-time testerA one-file page that waits a random time, turns green, and measures how fast you click. Timers, events and a little state.Done
- Whack-a-mole with a timerA complete little DOM game: a grid of holes, a mole that hops around, a score, a 20-second countdown and a high score.DonePremium
SQL
- An artist report for a streaming appOne query that builds the monthly report a streaming app sends its artists: plays, listeners, skip rate and their most played song.Done
- A creator dashboard for video channelsThe numbers a video platform shows its creators: views, watch hours, how much of each video people actually watch, comments, subscribers and the top video.DonePremium
- A month-by-month sales reportSix months of an online shop in one report: revenue per month, a running total for the year, the change on last month and the best-selling category.DonePremium
C
- An array that growsBuild a list of chat messages that grows with realloc, doubling its capacity when full, and watch the size, the capacity and the address change.DonePremium
- A tiny stack calculatorEvaluate sums like "3 4 + 2 *" with a stack, the way old calculators and many virtual machines work, printing the stack at every step.DonePremium
- A hex dump of a structPrint every byte of a game save struct in hex and see the fields, the little-endian ints and the padding bytes nobody asked for.Done