Results for “lists of dicts”

Showing 11–20 of 35

  1. Challenge

    Shift rota

    …the rota, and check its own work. In turn Build rota , a list of (day, shift, name) tuples for every shift of the week, in order, taking the crew in turn. Print one line per day, then count how many…

    Write the code Hard 2 stages project scheduling lists tuples
  2. Challenge

    Summary function

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

    Write the code Medium 2 stages functions return dictionaries min
  3. Challenge

    Index by ID

    Build a dict that maps every cargo ID to its record, so any item is found with one lookup instead of a search through the list, then answer a list of requests, including an ID that isn't on the…

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

    Mass by category

    Add up the cargo mass of each category into a dict with totals[category] = totals.get(category, 0) + mass, then list the categories from heaviest to lightest with their share of the load.

    Write the code Medium 2 stages dictionaries grouping get sorted
  5. 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
  6. Challenge

    API response

    Print the name, provider and status of a launch from a dict shaped like a launch-API response, then list every field the response has with items(), the way you'd inspect an API you haven't used…

    Write the code Easy 2 stages dictionaries keys items JSON
  7. Challenge

    Config loader

    …that fills in what is missing, checks what is there, and lists every problem before anything starts. Defaults first Load settings_text with json.loads() . Start config as a copy of DEFAULTS , fill in…

    Write the code Hard 3 stages project json configuration validation
  8. Challenge

    Sort by a field

    …launches in whatever order it likes, and the warehouse lists cargo in the order it was packed. The launch board needs dates in order, and the loading crew wants the heaviest items first, because they…

    Write the code Easy 2 stages functions sorted key reverse