Launch commit criteria
Minutes before launch, the launch director polls the teams. The launch only goes ahead if every single rule is met: the wind is within limits, there is no lightning nearby, and range safety reports GO. One failed rule means HOLD.
Write the GO/HOLD decision, then make it say which rules are holding the launch.
Finish stage 1 to unlock this stage.
Clear the launch only if all three rules are met: the wind is under 30 km/h, there is no lightning, and range safety reports GO. With today's reports:
Launch: GO
Join the three conditions with and. lightning is True or False, so not lightning means "no lightning". "Under 30" means 30 itself is too much.
Finish stage 1 to unlock this stage.
The reports have changed: the wind is up and there is lightning. HOLD on its own doesn't tell the launch director what to wait for. Before the decision, print one line for every rule that fails:
Wind 34 km/h, limit 30 km/h Lightning in the area Launch: HOLD
Give each rule its own if, not elif, so that every failing rule is reported, not just the first. When range safety isn't GO, print what it reported: Range safety: NO 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:].