Challenge
Alert deduplicator
…come within 60 seconds of the first into one line with a count, in the order they first appeared, then add the time range and a summary.
Showing 11–20 of 76
Challenge
…come within 60 seconds of the first into one line with a count, in the order they first appeared, then add the time range and a summary.
Challenge
Write summarise(readings), which returns the count, min, max and mean of a list of readings as one dict, then make it handle a pass with no data and round the mean, so any program can use the summary.
Challenge
…a 5% chance of a glitch, and seed random with 42 so the count is the same on every run and a test can check it exactly, then pick a kind for each glitch with random.choice().
Challenge
…next reading, so it never ends. Predict it, find the stuck counter, fix it, then write a wait that gives up when the readings run out.
Quiz
…quiz on Python while loops: 15 questions on conditions, counters, infinite loops, break and continue, with instant answers.
Challenge
…lines with too few fields instead of crashing, with a count of parsed and damaged lines.
Challenge
…stops the program. Skip lines that fail to convert and count them, then let one try cover short lines too and print each error.
Quiz
…tuples: 15 questions on indexing, packing and unpacking, count(), index(), slicing and nested tuples. Instant answers.
Challenge
A crew count read with input() crashes when 1 is added to it. Predict the crash, find out what input() really returns, fix it with int(), then write a packing tool that reads two numbers.
Article Mini projects
In Project Hail Mary, the alien engineer Rocky counts in base 6 because he has two hands with three fingers each. In this article, you'll build Python programs that convert between decimal, base-6…