Challenge
Never-ending wait
…the planet, the receiver waits for the antenna signal to get strong enough to lock on. The waiting code should print a line each second and then report the lock. Instead, the ground station screen…
Showing 11–20 of 32
Challenge
…the planet, the receiver waits for the antenna signal to get strong enough to lock on. The waiting code should print a line each second and then report the lock. Instead, the ground station screen…
Challenge
…ID. Answer each one from the index; an ID that isn't in it gets a message instead of a KeyError : CG-0044 | Freeze-dried meals | food | 42.0 kg CG-0099: not on the manifest CG-0042 | Water filter…
Challenge
…prints its result instead of returning it, so the caller gets None. Predict the last line, find out what the function gives back, fix it with return, then write a conversion function that returns.
Challenge
Write problems(item), which lists everything wrong with one cargo item: missing fields, a mass that isn't a number, is 0 or is over the limit. Print a pass or fail line per item, then catch duplicate…
Challenge
The monitoring system raises the same alert over and over. Group repeats of an alert that come within 60 seconds of the first into one line with a count, in the order they first appeared, then add the…
Challenge
Commands to the spacecraft don't always get through the first time: the radio can time out or lose the carrier. The uplink software tries again, but only a few times, so that a dead link doesn't block…
Challenge
…manifest needs whole kilograms, and there are two ways to get rid of the decimals: int() and round() . Most of the time they agree. When they don't, a crate can end up a kilogram lighter on paper than…
Challenge
…. Make it ask again instead, for as long as it takes to get a usable number. Ask until it's a number Keep asking until the input converts to a number. For anything that doesn't, print Not a number…
Challenge
…too, and copying the loop into each of them is how bugs get fixed in one place and not the other. Turn the parsing into a function that any program can call, then let it decide on its own which lines…
Challenge
…arrived, it sends it again. Mission Control would rather get an event twice than not at all, but the event board must show each one once. Drop the repeated events, then report which ones were…