Flatten nested ifs
The docking check for the station works, but it has grown into three if statements inside each other, with HOLD written out three times. Every new rule would push the code further to the right.
Flatten it into one condition without changing what it prints, then rewrite it so a HOLD says which check failed.
Finish stage 1 to unlock this stage.
Docking is GO only when all three checks pass: the closing speed is under 0.1 m/s, the alignment is under 2 degrees, and the latches are ready. Replace the three nested if statements with one if that joins the checks with and, and one else. The output must not change:
Docking: GO
Whatever the readings are, your version has to print exactly what the nested one would.
Finish stage 1 to unlock this stage.
The crew wants to know why docking is on hold. Rewrite the check as one flat chain that tests for each problem in turn and reports the first one it finds; GO goes in the else at the end:
Docking: HOLD, closing speed too high Docking: HOLD, misaligned Docking: HOLD, latches not ready Docking: GO
Check the speed first, then the alignment, then the latches. No if inside another if. With today's readings, it still prints GO.
Hints
Logical Operators and, or, not
# Logical operators: and, or, not
fuel_percent = 85
crew_ready = True
weather = "clear"
# AND - both conditions must be true
if fuel_percent > 70 and crew_ready:
print("Fuel and crew: GO")
# OR - at least one must be true
if weather == "clear" or weather == "overcast":
print("Weather: GO")
# NOT - flips True to False and vice versa
abort_signal = False
if not abort_signal:
print("No abort signal received")
# Combining all three in a launch decision
if fuel_percent > 70 and crew_ready and not abort_signal:
print("ALL SYSTEMS GO - clear for launch!")
else:
print("HOLD - check failed conditions")
# Try changing values above and run again
# What happens with fuel_percent = 50?
# What happens with abort_signal = True?
Separate arguments with commas. They're passed on every Run as sys.argv[1:].