🚀 Artemis Flight Manual
Today we'll be writing code that launches the Artemis Space Shuttle. No experience needed — just follow each lab and you'll be launching rockets in no time.
Let's Go!!

▶ Launch Online IDE
Reference: 📖 W3Schools – Python Tutorial
Pre-Flight Checks
Every mission starts with a simple test — making sure our systems can talk to us. Let's make sure Python is up and running!
Output is how your program shows you information. Think of it like a screen on the control panel displaying a message.
print("Hello, Houston!")
Lab 1: Ship Registry
A variable is like a labeled box where you store information. You give it a name, put something inside, and you can use it whenever you need it.
The Mission: We give our ship a name and tell Python to remember it. That way, we can use it anywhere in our program without typing it out every time.
ship_name = "Artemis One"
print(ship_name)
Lab 2: Fuel Gauges
Whole numbers (like 100) are called Integers. Numbers with a decimal point (like 98.5) are called Floats. Python uses both for different kinds of measurements.
The Mission: We track our fuel and oxygen levels. Whole numbers work for fuel, but oxygen needs a decimal for more precise readings.
fuel_level = 100 # Whole number
oxygen_percent = 98.5 # Decimal number
print(f"Fuel: {fuel_level}% | Oxygen: {oxygen_percent}%")
Lab 3: Cargo Manifest
A list lets you store multiple items together in one place. Think of it as a checklist — each item has a number, starting at 0.
The Mission: We load our supplies into a list so we can keep track of everything on board. We can grab any item by its position number.
supplies = ["Oxygen", "Water", "Batteries"]
print(supplies[0]) # Grabs the first item: Oxygen
Lab 4: Safety Checks
A conditional is a yes/no question your program asks itself. If the answer is yes, it does one thing — if no, it does something else.
The Mission: Before launch, we check if there's enough fuel. If there is, we're a go. If not, we hold the launch.
fuel = 45
if fuel > 50:
print("Launch sequence initiated.")
else:
print("Hold launch: Low fuel levels.")
Lab 5: The Countdown
A for loop repeats the same action a set number of times. It's perfect for anything that needs to count — like a launch countdown!
The Mission: We count down from 5 to 1, then trigger liftoff. The loop handles the counting automatically so we don't have to write each number by hand.
for second in range(5, 0, -1):
print(f"{second} seconds to ignition...")
print("Liftoff!")
Lab 6: Mission Telemetry
A dictionary stores information in pairs — a name and its value. It's like a contact list: you look up a name and get their number.
The Mission: We store our ship's speed and shield levels so we can look them up instantly by name during the flight.
telemetry = {"Speed": 28000, "Shields": 100}
print(f"Current Speed: {telemetry['Speed']} km/h")
Lab 7: Auto-Pilot
A function is a saved set of instructions you can run whenever you want. Like pressing a button — one tap, and it does its job.
The Mission: We program an auto-pilot button that runs a hull check whenever we call it. Write it once, use it as many times as you need.
def check_hull():
print("Hull integrity check: 100%. No breaches detected.")
check_hull() # Press the button to run it
Lab 8: Data Slicing
Slicing lets you grab just a portion of a list — like tearing out only the last few pages of a logbook instead of reading the whole thing.
The Mission: Our sensors have been logging data the whole flight. We only need the last three readings to check our current trajectory.
sensor_logs = [10, 22, 35, 48, 55, 62, 70]
recent_data = sensor_logs[-3:] # Grabs the last three entries
print(f"Recent trajectory markers: {recent_data}")
Lab 9: Orbital Persistence
A while loop keeps repeating as long as something is true. It's great for situations where you don't know exactly how many times you'll need to repeat — like slowing down until you hit the right speed.
The Mission: We fire the braking thrusters over and over until we slow down enough to hold a stable orbit.
velocity = 25000
while velocity > 17500:
print("Braking thrusters active...")
velocity -= 2500
print("Orbit stabilized.")
Lab 10: Logic Overrides
Logical operators let you check multiple things at once. and means both must be true. or means at least one must be true. not flips true to false (and vice versa).
The Mission: Before sending the crew outside, we check that both oxygen and power are at safe levels. Both conditions must pass or the spacewalk is cancelled.
oxygen_ok = True
power_reserve = 15
if oxygen_ok and power_reserve > 20:
print("Safe for EVA.")
else:
print("EVA Aborted: Check constraints.")
Lab 11: Fault Isolation
Exception handling is a safety net for your program. If something goes wrong, instead of crashing, it catches the problem and lets you handle it gracefully.
The Mission: A navigation glitch causes a bad calculation. Instead of the whole system crashing, we catch the error and keep the ship running.
try:
navigation_calc = 10 / 0
except ZeroDivisionError:
print("Warning: Navigation glitch detected! Recalibrating...")
Lab 12: Automated Filtering
List comprehension is a shortcut for creating a new list based on an existing one. It's a quick way to scan through data and pull out only what you need.
The Mission: We scan all temperature readings across the ship and automatically flag any zones running too hot.
temps = [22, 25, 18, 32, 21]
hot_zones = [t for t in temps if t > 25]
print(f"Alert: High heat in sectors: {hot_zones}")
🌟 Final Challenge: The Flight Director
You've made it to the final mission. Put everything together:
- Store ship stats in a Dictionary
- Create a Function that uses Logical Operators for a pre-flight check
- Use a For Loop to countdown
- Use an If/Else block to confirm ignition
# 1. Ship stats
ship = {"fuel": 80, "oxygen": True, "shields": 95}
# 2. Pre-flight check
def pre_flight_check(stats):
if stats["oxygen"] and stats["fuel"] > 50 and stats["shields"] > 80:
return True
return False
# 3. Countdown + 4. Launch decision
if pre_flight_check(ship):
for second in range(5, 0, -1):
print(f"{second}...")
print("🚀 Ignition! Artemis One is go for launch!")
else:
print("❌ Launch aborted. Review ship diagnostics.")
You've completed the Python Flight Manual. All systems nominal — welcome to the crew, Engineer.