Question: Question 2 : Create a program that calculates the amount of time and fuel to fly a specified distance. ( 2 0 pts . )

Question 2: Create a program that calculates the amount of time and fuel to fly a specified distance. (20 pts.)
```
Aircraft Fuel Calculator
Distance in nautical miles: 180
Flight time: 1 hour(s) and 30 minute(s)
Required fuel: 16.8 gallons
Continue? (y/n): y
Distance in nautical miles: 121
Flight time: 1 hour(s) and 0 minute(s)
Required fuel: 12.7 gallons
Continue? (y/n): n
Bye!
```
(2a) Assume that an aircraft can fly 120 nautical miles (knots) per hour. Assume that an aircraft burns 8.4 gallons of gas per hour. Create two variables to represent these two constant values. (2 pts.)
(2b) For safety, add a half hour to the flight time when calculating the amount of required fuel. (2 pts.)
(2c) Round the amount of required fuel to 1 decimal place. (2 pts.)
(2d) Create a loop structure. The program should continue only if the user enters "\( y \)" or "\( Y \)" to continue. (4 pts.)
(2e) Display the messages shown in the screenshot. Use f-string to format the output of Flight time and Required fuel. (10 pts.)
- Assume the user will enter valid data.
Question 2 : Create a program that calculates the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!