Question: Please do not give me something thats already been on chegg. In this lab you'll be building a tool to allow people to compare their

In this lab you'll be building a tool to allow people to compare their vehicles. So, basically, assume a family has two vehicles they're able to use and they're trying to decide which vehicle would be best to use on a road trip. Your job is to create a program that takes in the names (make, model, year) of two vehicles and their gas mileage and tank capacity. You should then ask the user how many miles their trip is supposed to be and calculate how many tanks of gas it would take for each vehicle. Finally, you should get an average gas price (for instance, $1.99 per gallon) and list how much that particular vehicle would cost. Finally, your program should display the information in a clean, formatted way. It should resemble a table of some sorts. Have a header and each column a set width. Here's what mine are in my code: Car - width of 30 spaces Tanks - width of 10 spaces (left aligned) Cost - this one doesn't matter so much since it's the last column (I didn't format that to any specific number of spaces) You can assume the values won't cause it to go over the set number of spaces. Notes: When calculating how many tanks of gas is needed, you'll need to round up. So, if your vehicle takes 3.4 tanks, your program should print that it'll need 4 tanks. Also, make sure you're formatting your costs to two decimal points and include a dollar sign (directly next to it). A price of $2.40 should not read "$ 2.4". Additionally, your price should be based on how much it is to fill up a full tank on each individual vehicle. You shouldn't just calculate how many gallons that car would need and then calculate that cost
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
