Results for “get”

Showing 11–20 of 32

  1. 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…

    Fix the code Easy 3 stages while loop infinite loop counter and
  2. Challenge

    Index by ID

    …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…

    Write the code Medium 2 stages dictionaries indexing lookup in
  3. Challenge

    Prints instead of returns

    …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.

    Fix the code Easy 3 stages functions return print None
  4. Challenge

    Manifest validator

    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…

    Write the code Medium 2 stages project validation dictionaries functions
  5. Challenge

    Alert deduplicator

    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…

    Write the code Hard 2 stages project dictionaries tuples as keys grouping
  6. Challenge

    Retry the uplink

    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…

    Write the code Medium 2 stages for loop range break retry
  7. Challenge

    Round or cut?

    …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…

    Write the code Medium 3 stages int round rounding type conversion
  8. Challenge

    Safe number input

    …. 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…

    Write the code Easy 2 stages errors try except ValueError
  9. Challenge

    Parser function

    …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…

    Fix the code Medium 2 stages functions return dictionaries None
  10. Challenge

    Duplicate events

    …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…

    Write the code Medium 2 stages sets add in deduplication