Simulator Script Fix: Cabin Crew
actions = { "1": "Serve beverages", "2": "Check seatbelts", "3": "Handle passenger request", "4": "Make PA announcement", "5": "Prepare for landing", "6": "Respond to emergency", "7": "View cabin status", "8": "End shift" } def print_slow(text, delay=0.03): for char in text: print(char, end='', flush=True) time.sleep(delay) print("\n")
def handle_passenger(seat): if seat not in passengers: print(f"No passenger found at {seat}.") return p = passengers[seat] print(f"Approaching {seat} – {p['type']} passenger.") if p['needs'] == "reassurance": print("You calmly explain the situation. The passenger relaxes.") cabin_status['passenger_calm'] += 5 del passengers[seat] elif p['needs'] == "snack": print("You give the child a snack. They smile happily.") cabin_status['passenger_calm'] += 3 del passengers[seat] elif p['needs'] == "water": print("You bring water to the elderly passenger. They thank you.") cabin_status['passenger_calm'] += 4 del passengers[seat] elif p['needs'] == "complaint_about_delay": print("You listen patiently and offer a free drink voucher. The passenger calms down.") cabin_status['passenger_calm'] += 6 del passengers[seat] elif p['needs'] == "asthma_inhaler": print(" You retrieve the onboard first aid kit and assist with the inhaler. Passenger stabilizes.") cabin_status['medical_emergency'] = True cabin_status['passenger_calm'] -= 10 del passengers[seat] else: print("You try to help but the request is unclear. No effect.") cabin crew simulator script
def emergency_procedure(): print_slow("🚨 EMERGENCY! Prepare for evacuation commands.") print("1. Assume brace position") print("2. Shout 'Brace, Brace!'") print("3. Open exits when aircraft stops") choice = input("Choose correct step 1-3: ") if choice == "2": print_slow("✅ Correct! Passengers respond.") cabin_status['passenger_calm'] += 10 else: print_slow("❌ Wrong command. Chaos ensues. Simulation ends.") exit() def main(): print_slow("✈️ Welcome to Cabin Crew Simulator ✈️") print_slow("You are the Lead Flight Attendant on a Boeing 787.") print_slow("Manage cabin safety, passenger needs, and unexpected events.\n") actions = { "1": "Serve beverages", "2": "Check