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…
Showing 141–150 of 202
Challenge
…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…
Challenge
…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'…
Challenge
…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…
Challenge
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…
Challenge
…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…
Challenge
…compare it with both words that mean on, joined by or . For " YES " it prints the first line.
Challenge
…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"…
Challenge
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.
Example
Looping through keys, values or key-value pairs of a dictionary.
Challenge
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.