Challenge
One orbit short
A loop over range(1, 10) logs nine orbits of a ten-orbit flight. Predict the last line, find out where range() stops, fix it with ORBITS + 1, then list every third orbit with a range() step.
Showing 1–10 of 13
Challenge
A loop over range(1, 10) logs nine orbits of a ten-orbit flight. Predict the last line, find out where range() stops, fix it with ORBITS + 1, then list every third orbit with a range() step.
Challenge
Print a launch countdown from T-10 to T-0 with range(10, -1, -1), adding a hold line at every second listed in holds, then scrub the launch at a given second with break, or print Liftoff! at the end.
Challenge
…last line is Uplink failed after 3 attempts . Loop over range(1, MAX_ATTEMPTS + 1) , break on success, and use a flag such as sent to tell the two endings apart. Back off between tries Retrying at…
Challenge
…if the wind is under 30 km/h, there is no lightning and range safety reports GO, using and and not, then print every rule that is holding the launch.
Challenge
…over a copy of the defaults, check each value's type and range and report every problem in one go, then wrap it all in a load_config() that never crashes, even on broken JSON.
Challenge
…the longitude under a spacecraft with an if/elif chain of ranges, then accept longitudes from 0 to 360 and reject values that can't be longitudes.
Challenge
…loops around: the outer loop goes over the column numbers, range(len(grid[0])) , and the inner loop over the rows, checking line[column] . A flag says whether the column was blocked.
Challenge
…a syntax error, a type error, a wrong key, an index out of range and a reversed decision. Read each error to fix the four that crash, then find the one that runs but gives the wrong answer.
Challenge
…count, in the order they first appeared, then add the time range and a summary.
Challenge
…what it can't trust, raise the alarm on what is out of range and leave a summary the dashboard can read. Three stages: validate, flag, save. Validate the rows Read telemetry.csv with csv.DictReader…