Go launches only
The launch list from the API mixes launches that are cleared to fly with ones still waiting for a date, a payload or the weather. The public board highlights only the launches that are Go.
Filter the list by status, then add a line for everything that is still waiting.
Finish stage 1 to unlock this stage.
Print only the launches whose status is Go, with their provider:
Lumen-3 (JAXA) Tern-5 (ISRO) Aurora Relay 2 (JAXA)
Loop over the launches and compare launch["status"] with "Go".
Finish stage 1 to unlock this stage.
Collect the launches that aren't Go, each with its status, and print them on one line after the Go launches, or none:
Lumen-3 (JAXA) Tern-5 (ISRO) Aurora Relay 2 (JAXA) Not go yet: Kestrel-7 (TBD), Polaris Cargo 4 (Hold)
Build a list in the else branch, then join it after the loop.
Hints
Iterating Over Dictionary
# How long a single day lasts on each planet, measured in Earth hours
day_hours = {
"Mercury": 1408,
"Venus": 5832,
"Earth": 24,
"Mars": 24.6,
"Jupiter": 9.9,
}
# A plain for loop walks the keys
for planet in day_hours:
print("Planet:", planet)
# .values() walks the values instead
total = 0
for hours in day_hours.values():
total = total + hours
print("All five days added together:", total, "hours")
# .items() hands you the key and the value at the same time
for planet, hours in day_hours.items():
print(f"{planet}: one day is {round(hours / 24, 2)} Earth days")
# sorted() walks the same keys in a different order
for planet in sorted(day_hours):
print(planet, "->", day_hours[planet], "hours")
Separate arguments with commas. They're passed on every Run as sys.argv[1:].