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…
Showing 51–60 of 75
Challenge
…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…
Challenge
…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…
Challenge
…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…
Challenge
…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.
Challenge
…still gives the right record. Keep the passed line at the end.
Challenge
…, 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…
Challenge
At the end of every orbit the flight director gets one line about the log: how many entries of each level it had. A sudden jump in warnings says more than any single entry. Count the entries per…
Challenge
…is always first, and whoever joined last is at the end. The mission board shows who is in charge, who is newest and how many people are on board. Read those facts out of the list, then add the full…
Challenge
…indexes exist, fix it, then pick out readings at either end and in the middle. Predict and run Don't run the code yet. Read it and decide what it will print. Write your guess in prediction , at the…
Challenge
…each branch instead of printing it, and print once at the end: ENG-2: 412.5 °C, WARN Each branch sets level , and the single print() after the chain uses it.