+ 1

Can anyone explain how to put this into code

A taxi driver is calculating their profit over two weeks by adding up the fares they charge and subtracting the cost of gas. The price of gas changes over time - it was $3.52/gallon the first week and $3.57/gallon this second week. Their car gets 20 miles per gallon. For the first week the driver had a total of 23 passengers with average $29 fare each, and drove a total of 160 miles. For the second week they had 17 passengers with average $30 fare each, and drove a total of 220 miles. Assume that for both weeks they purchase all the gas needed during that week (i.e. they refuel every week to maintain a constant level of gas in the tank). Based on the above, answer the following questions: What is their total profit over both weeks? During which week was their average (mean) profit per passenger higher?

23rd Oct 2019, 8:41 PM
Christopher Richey
Christopher Richey - avatar
1 Réponse
+ 5
Start by showing your attempts, and were you are stuck, we don't write codes here, we correct them.
23rd Oct 2019, 9:40 PM
Aymane Boukrouh
Aymane Boukrouh - avatar