Answered step by step
Verified Expert Solution
Question
1 Approved Answer
My code should have this output. This is the codegame that experiences the gravities for each planets. after landing level 1 moon, the level should
My code should have this output. This is the code"game" that experiences the gravities for each planets. after landing level 1 moon, the level should be go up as following.
This is my code but it gives me EOF error. May I know why and Can I get help with this?
Traceback (most recent call last): File "main.py", line 34, in
This must be in python,
5 Example 2 Welcome to Lunar Lander Game Do you want to play level 1? (yeso) yes Entering Level 1 Landing on the Moon Gravity is-1.62 m/s^2 Initial Altitude: 50 meters Initial Velocity 0.00 m/s Burning a unit of fuel causes 0.10 m/s slowdown Initial Fuel Level: 150 units GO Enter units of fuel to use: bad Please Enter Integer Value Enter units of fuel to use: input Please Enter Integer Value Enter units of fuel to use: 90 Cannot use neagtive fuel Enter units of fuel to use: 200 No enough fuel Max Fuel: 150 Enter units of fuel to use: 0 After seconds Altitude is 48.38 meters, velocity is-1.62 m/s Remaining Fuel: 150 units. Enter units of fuel to use: After 2 seconds Altitude is 45.13 meters, velocity is -3.24 m/s Remaining Fuel: 150 units Enter units of fuel to use: After 3 seconds Altitude s 40.27 meters, velocity is -4.87 m/s Remaining Fuel: 150 units Enter units of fuel to use: 6 5 Example 2 Welcome to Lunar Lander Game Do you want to play level 1? (yeso) yes Entering Level 1 Landing on the Moon Gravity is-1.62 m/s^2 Initial Altitude: 50 meters Initial Velocity 0.00 m/s Burning a unit of fuel causes 0.10 m/s slowdown Initial Fuel Level: 150 units GO Enter units of fuel to use: bad Please Enter Integer Value Enter units of fuel to use: input Please Enter Integer Value Enter units of fuel to use: 90 Cannot use neagtive fuel Enter units of fuel to use: 200 No enough fuel Max Fuel: 150 Enter units of fuel to use: 0 After seconds Altitude is 48.38 meters, velocity is-1.62 m/s Remaining Fuel: 150 units. Enter units of fuel to use: After 2 seconds Altitude is 45.13 meters, velocity is -3.24 m/s Remaining Fuel: 150 units Enter units of fuel to use: After 3 seconds Altitude s 40.27 meters, velocity is -4.87 m/s Remaining Fuel: 150 units Enter units of fuel to use: 6Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started