Results for “end”

Showing 31–40 of 56

  1. Challenge

    Read the traceback

    …Fill in error_type , crash_function and crash_line at the end of the program, then fix the bug on that line so the program prints: Average: 695.0 K Fix the function, not the data: the readings come…

    Fix the code Easy 2 stages errors traceback KeyError TypeError
  2. Challenge

    Survive bad lines

    …new counter, skipped , and go on to the next line. At the end, report all three numbers: 09:30:05 ENG-2: 412.5 C 09:30:05 TANK-1: 78.3 % Damaged line: 2026-03-14T09:30:10Z,TANK-1 09:30:10 ENG-2: 415.0…

    Write the code Medium 2 stages errors try except ValueError
  3. Challenge

    Prove the fix

    …very list that was passed in. Keep the passed line at the end. The hidden tests now also try two "fixes" that break this: one that ignores the log it is given, and one that returns a copy instead of…

    Write the code Medium 2 stages testing assert regression tests default values
  4. Challenge

    Edge cases

    …[-2, 2] , whose mean is 0. Keep the passed line at the end. The hidden tests break the empty-list check and the handling of negative numbers.

    Write the code Medium 2 stages testing assert edge cases None
  5. Challenge

    Extract a function

    …to print each distance, and print the nearest one at the end: To waypoint A: 193.0 km To waypoint B: 323.3 km To waypoint C: 7.7 km Nearest: C (7.7 km) Call distance_km() once per waypoint, and…

    Fix the code Easy 2 stages functions refactoring return tuples
  6. Challenge

    Parser function

    …strips the line, so spaces around a good line don't end up in its fields, and returns None for a blank line, a comment, or a line that doesn't have exactly four fields. The loop just keeps whatever…

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

    Silent branch

    …Python printed. Follow "Scrub" through the function to its end. Investigate and modify Investigate. Store what status_light("Scrub") and status_light("TBD") give back, as text, in scrub_gives and…

    Fix the code Easy 3 stages functions return None branches
  8. Challenge

    Test the alert levels

    …and 450, and 399.9 and 449.9. Keep the passed line at the end. The hidden tests now break the function the way people really do: > instead of >= , or a threshold off by one.

    Write the code Medium 2 stages testing assert functions boundaries
  9. Challenge

    Validate a cargo record

    …, append each problem you find, and return problems at the end. Check that "mass_kg" is there before comparing it. The ID format Cargo IDs have a fixed format: CG- followed by exactly four digits. Add…

    Write the code Medium 2 stages functions return lists validation