Results for “output”

Showing 1–10 of 20

  1. Challenge

    Legacy script

    …it into parse_feed() and summary_line() with the output unchanged to the character, then add assert tests that would catch either function breaking.

    Fix the code Hard 2 stages project refactoring functions testing
  2. Challenge

    Copy-pasted blocks

    …a list of (name, level) pairs and one loop, keeping the output exactly the same, then add a fourth tank with a single list item and list the low tanks.

    Fix the code Medium 2 stages refactoring for loop tuples lists
  3. Challenge

    Extract a function

    …for three waypoints into distance_km(a, b), keeping the output exactly the same, then put the waypoints in a dict and find the nearest one with the same function.

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

    Flatten nested ifs

    …nested ifs into one condition joined with and, keeping the output exactly the same, then rewrite it as a flat if/elif chain that reports the first check that failed.

    Fix the code Medium 2 stages if elif and nested conditions
  5. Challenge

    Manifest line

    Unpack an (id, item, mass_kg) tuple into three named variables and print a cargo manifest line, then fix the ValueError when the manifest adds a fourth field.

    Write the code Easy 2 stages tuples unpacking ValueError formatting
  6. Challenge

    Progress on one line

    Make two prints share one line, like Uploading flight plan... done, by changing how print() ends. A Python challenge on print(end=...) for progress messages.

    Write the code Easy 3 stages print end progress console