68 lines
1.9 KiB
Python
68 lines
1.9 KiB
Python
import time
|
|
|
|
|
|
def m_narrator():
|
|
print("After days of drifting in darkness, you finally reach your destination - the moon")
|
|
time.sleep(5)
|
|
print(
|
|
"The onboard computer is about to finish the last few calculations to land you on the surface safely, as it suddenly stops")
|
|
print()
|
|
time.sleep(7)
|
|
print("ERROR: UNEXPECTED VARIABLES DETECTED")
|
|
time.sleep(2)
|
|
print("PROCEED WITH MANUAL LANDING")
|
|
print()
|
|
time.sleep(2)
|
|
print("Lucky that the sensors are still functioning")
|
|
time.sleep(2)
|
|
print("________________________")
|
|
print("ALTITUDE: 50.000m")
|
|
print("DESCENT SPEED: -1000m/s")
|
|
print("FUEL: 10.000l")
|
|
print("________________________")
|
|
time.sleep(2)
|
|
print("MOON ACCELERATION: -1,63m/s²")
|
|
print("ENGINE ACCELERATION: 12m/s²")
|
|
print("________________________")
|
|
time.sleep(3)
|
|
print()
|
|
print("As the gravity pulls you to your demise, the time to decide comes")
|
|
print()
|
|
|
|
def moon_landing():
|
|
#m_narrator()
|
|
fuel = 10000
|
|
altitude = 50000
|
|
speed = -1000
|
|
m_ac = -1.63
|
|
e_ac = 12
|
|
t = 1
|
|
|
|
while True:
|
|
if altitude <= 0:
|
|
if speed > -10:
|
|
print("You landed successfully")
|
|
else :
|
|
print("As your ship descended violently, you regretted not paying attention in physics class")
|
|
break
|
|
if input(f"Will you spend {100}l fuel to decelerate? (y/n): ") == "y":
|
|
print()
|
|
print("You turn the engines on for a while")
|
|
fuel = fuel - (100)
|
|
speed = speed+(e_ac*1)
|
|
altitude = altitude + speed
|
|
else :
|
|
print("you do nothing")
|
|
speed = speed+(m_ac*1)
|
|
altitude = altitude + speed
|
|
|
|
print("________________________")
|
|
print("ALTITUDE: ",altitude)
|
|
print("DESCENT SPEED: ",speed)
|
|
print("FUEL: ", fuel)
|
|
print("________________________")
|
|
print()
|
|
|
|
m_narrator()
|
|
moon_landing()
|