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")
# CABIN CREW SIMULATOR v1.0 # A text-based simulation for flight attendants import time import random ------------------- GLOBAL DATA ------------------- cabin_status = { "seatbelt_sign": True, "cabin_temp": "normal", "turbulence": False, "medical_emergency": False, "passenger_calm": 80, # 0-100 "cabin_crew_morale": 85 } cabin crew simulator script
def random_event(): events = [ {"text": "Turbulence hits!", "effect": lambda: setattr(cabin_status, 'turbulence', True) or print("Secure cabin immediately!")}, {"text": "A passenger starts shouting.", "effect": lambda: passengers.update({"random_seat": {"type": "angry", "needs": "complaint_about_delay"}})}, {"text": "Cabin temperature drops.", "effect": lambda: setattr(cabin_status, 'cabin_temp', 'cold')}, {"text": "Child starts crying loudly.", "effect": lambda: passengers.update({"row_19C": {"type": "child", "needs": "snack"}})}, ] if random.random() < 0.3: # 30% chance per loop event = random.choice(events) print_slow(f"\n⚠️ RANDOM EVENT: {event['text']}") event 'effect' def emergency_procedure(): print_slow("🚨 EMERGENCY
Select action: 2 Checking seatbelts. Everyone is secured. Shout 'Brace, Brace
passengers = { "row_12A": {"type": "anxious", "needs": "reassurance"}, "row_14C": {"type": "child", "needs": "snack"}, "row_22F": {"type": "elderly", "needs": "water"}, "row_08B": {"type": "angry", "needs": "complaint_about_delay"}, "row_30D": {"type": "medical", "needs": "asthma_inhaler"} }