Menu

Entire Class Due 05 20 2020 6 59 Pm 230 Lab Driving Costs Driving Expensive Write Program Q43779950

Entire class due: 05/20/2020, 6:59 PM 2.30 LAB: Driving costs Driving is expensive. Write a program with a cars miles/gallon

Entire class due: 05/20/2020, 6:59 PM 2.30 LAB: Driving costs Driving is expensive. Write a program with a car’s miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Output each floating point value with two digits after the decimal point, which can be achieved as follows print(‘{: .2f} {: .2f} {: .2f}’.format(your_valuel, your_value2, your_value3 )) Ex: If the input is: 20.0 3.1599 Then the output is: 1.58 7.90 63.20 Note: Real per-mile cost would also include maintenance and depreciation ACTIVITY 2.30.1: LAB: Driving costs 0/10 main.py Load default template… 1 ” Type your code here.” Show transcribed image text Entire class due: 05/20/2020, 6:59 PM 2.30 LAB: Driving costs Driving is expensive. Write a program with a car’s miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Output each floating point value with two digits after the decimal point, which can be achieved as follows print(‘{: .2f} {: .2f} {: .2f}’.format(your_valuel, your_value2, your_value3 )) Ex: If the input is: 20.0 3.1599 Then the output is: 1.58 7.90 63.20 Note: Real per-mile cost would also include maintenance and depreciation ACTIVITY 2.30.1: LAB: Driving costs 0/10 main.py Load default template… 1 ” Type your code here.”

Expert Answer


Answer to Entire class due: 05/20/2020, 6:59 PM 2.30 LAB: Driving costs Driving is expensive. Write a program with a car’s miles/g…

OR