Requirements: Use f-strings and write pseudocode/step explanation program2_3.py Road Trip! You and some friends are planning a trip. Fuel costs will be shared. You can estimate the cost of the drive with a program if you know the distance in miles, the average mpg of your vehicle, how many people are sharing the cost, and the price of gas along the route. Research reveals that gas is $2.79 per gallon. Assign that to a properly named constant and assign the other three values from keyboard inputs. Your program should calculate and print the total cost of the return trip(1 way) and the cost per person. All outputs must use f-strings.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Python Question
Requirements: Use f-strings and write pseudocode/step explanation
program2_3.py
Road Trip!
You and some friends are planning a trip. Fuel costs will be shared. You can estimate the cost of the drive with a
Sample output
Enter distance in miles: 350
Enter mpg: 27
Enter number of people 4
The total cost of the trip is $36.17
The total cost per person is $9.04
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images