Results for “index”

Showing 1–10 of 41

  1. Challenge

    Index by ID

    …six items, but the real manifest has thousands. Build an index from ID to record once, then answer the questions from it. Build the index Build a dict called by_id that maps each cargo ID to its…

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

    Missing index

    readings[5] on a list of five readings stops with an IndexError. Predict it, work out the valid indexes with len(), fix it with [-1], then print the first, middle and last readings for any length.

    Fix the code Easy 3 stages lists indexing IndexError len
  3. Challenge

    Crew roster

    …Commander: Okafor Newest member: Kowalska Crew size: 4 Indexes start at 0, as in strings. crew[-1] is the last item whatever the list's length, and len(crew) counts the items. The whole roster Add the…

    Write the code Easy 2 stages lists indexing negative index len
  4. Challenge

    Flight software review

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

    Fix the code Hard 2 stages project debugging SyntaxError TypeError