Results for “for”

Showing 141–150 of 202

  1. Challenge

    Debris grid

    …needs the exact position of every piece. Scan the grid for debris, then find the columns the ship could fly through. Every hit Find every # , row by row, and print its row and column, both counted…

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

    Wrong average

    …0.75 hours, then 1.5 km in half an hour. Its average speed for the whole drive is the total distance divided by the total time: Average speed: 6.0 km/h Careful: it isn't the average of the two legs'…

    Fix the code Easy 3 stages order of operations brackets average debugging
  3. Challenge

    Mission Control online

    …what the monitor expects. Status line The monitor waits for this line: Mission Control online Print it with print() . The test compares every character: a capital M and C, one space between the words…

    Write the code Easy 2 stages print output strings beginner
  4. Challenge

    Settings with defaults

    The mission dashboard has a default for every setting, and each user's profile stores only what they have changed. When a user opens the dashboard, the two have to be combined: their values where they…

    Write the code Medium 2 stages dictionaries copy update defaults
  5. Challenge

    Backup that isn't

    …Make: Plan a rotation The next rotation swaps Tanaka for Moreau. Build the planned roster as a separate list: copy crew , remove Tanaka from the copy and add Moreau at the end. Then print both…

    Fix the code Medium 3 stages lists copy references is
  6. Challenge

    Flag from config text

    …compare it with both words that mean on, joined by or . For " YES " it prints the first line.

    Fix the code Easy 3 stages bool if else config
  7. Challenge

    JSON-looking payload

    …reads status messages from Python One in JSON, the text format almost every web API uses. A JSON message is full of double quotes, and this one has an apostrophe as well: {"status": "GO", "note"…

    Fix the code Medium 2 stages quotes escape sequences f-strings json
  8. Challenge

    Log analyser

    Turn the launch-day mission log into answers: parse each line into a dict, count the entries per level and per hour, find the first ERROR, then rank the subsystems by how many warnings they raised.

    Write the code Hard 3 stages project logs parsing Counter
  9. Challenge

    Read the traceback

    A Python program stops with a traceback. Read it from the bottom up to find the error, the function and the line, fix the bug there, then follow a longer traceback through four calls to a second bug.

    Fix the code Easy 2 stages errors traceback KeyError TypeError