Results for “range”

Showing 1–10 of 21

  1. 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.

    Fix the code Easy 3 stages for loop range off-by-one step
  2. Challenge

    Countdown with holds

    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.

    Write the code Easy 2 stages for loop range negative step in
  3. Challenge

    Retry the uplink

    …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…

    Write the code Medium 2 stages for loop range break retry
  4. Challenge

    Launch commit criteria

    …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.

    Write the code Easy 2 stages if else and not
  5. Challenge

    Config loader

    …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.

    Write the code Hard 3 stages project json configuration validation
  6. Challenge

    Ground station pick

    …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.

    Write the code Easy 2 stages if elif else ranges
  7. Challenge

    Debris grid

    …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.

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

    Flight software review

    …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.

    Fix the code Hard 2 stages project debugging SyntaxError TypeError