Results for “key”

Showing 1–10 of 32

  1. Challenge

    Missing field

    Reading launch["pad"] stops with a KeyError when the API hasn't assigned a pad yet. Predict it, check the keys with in, fix it with get() and a default, then print a list of launches with defaults for…

    Fix the code Easy 3 stages dictionaries KeyError get default values
  2. Challenge

    Sorted copy

    …then sort names like de Vries and van Dijk correctly with key=str.lower.

    Write the code Easy 2 stages lists sorted sort key
  3. Challenge

    Confirm by name

    …confirm=True is passed by name: a bare * makes confirm keyword-only and required, then an is True check refuses values that are merely truthy, such as "yes".

    Write the code Medium 2 stages functions keyword-only arguments * safety
  4. Challenge

    Flight software review

    …check has five bugs: a syntax error, a type error, a wrong key, an index out of range and a reversed decision. Read each error to fix the four that crash, then find the one that runs but gives the…

    Fix the code Hard 2 stages project debugging SyntaxError TypeError
  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