Results for “count”

Showing 21–30 of 48

  1. Challenge

    Changed the caller's list

    …the day have one more value in them, and the daily report counts readings that were never really taken. Predict what the program prints, find out how the preview reached the stored list, fix the…

    Fix the code Medium 3 stages functions lists mutation return
  2. Challenge

    Duplicate events

    …once Print each event once, keeping the first copy, and count the copies you dropped: EV-1001 Hatch closed EV-1002 Cabin pressure nominal EV-1003 Abort system armed EV-1004 Switched to internal power…

    Write the code Medium 2 stages sets add in deduplication
  3. Challenge

    Catch what you expect

    …, and the number of readings that are really bad in bad_count . Modify. Catch only ValueError . The hidden error then stops the program with a traceback: fix it. It must print: Bad reading: n/a Good…

    Fix the code Medium 3 stages errors try except ValueError
  4. Challenge

    Shared default list

    …call without a log would return, and store it in third_count . Remove any lines you added before you check. Modify. Give each call without a log its own new list. It must print: Morning: ['ENG-2…

    Fix the code Medium 3 stages functions default values mutable defaults None
  5. Challenge

    Debris grid

    …every # , row by row, and print its row and column, both counted from 0, as indexes are. Then print how many there are: Debris at row 0, column 2 Debris at row 2, column 5 Debris at row 3, column 0…

    Write the code Medium 2 stages nested loops enumerate range strings
  6. Challenge

    First error

    …one Find the first ERROR entry, print its line number, counting from 1, with the entry itself, and stop searching there: First error on line 4: [T+00:14:47] ERROR Fuel valve 2 not responding Loop with…

    Write the code Easy 2 stages for loop break enumerate flags
  7. Challenge

    Off-by-one slice

    …you'll see your prediction next to what Python printed. Count the positions in CG-0042 carefully before you guess. Investigate and modify Investigate. Store the index of the dash in dash_index and the…

    Fix the code Easy 3 stages strings slicing indexing off-by-one