Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help please main.py Load defeut template 1 mileage - float (input ()) 2 cost = float (input ()) 3 4 cost_20_miles - round

I need help please
image text in transcribed
image text in transcribed
image text in transcribed
main.py Load defeut template 1 mileage - float (input ()) 2 cost = float (input ()) 3 4 cost_20_miles - round ( cost / mileage 20,2) 5 cost_75_miles = round ( cost / mileage 75,2) 6 cost_500_miles - round ( cost mileage =500,2) 7 8 print(f" { Cost_20_miles: 2f} fcost 75 miles: 2f } \{cost 500 miles:.2f }") Run your program as often as you'd lke, before submiting for grading, Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. zyBooks My library > CTI 110: Web, Programming, Database Foundation ... > 7.13: LAB: Driving costs File"",line1(cost75miles)SyntaxError:invalidsyntax Input Your output Your program produced no output Expected output 2:Compare output Your output Your program produced no output Expected output 7.13 LAB: Driving costs Driving is expensive. Write a program with a car's gas milage (miles/gallon) and the cost of gas (dollars/gallon) as flcating-point input, and output the gas cost for 20 miles, 75 miles, and 500 miles Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print(f'\{your_value1: .2f\} \{your_value2:..2f\} \{your_vatue 3:.2f}} ) Ex if the input is: 20.03.1599 Where the gas mileage is 200 miles/gallon and the cost of gas is $3.1599/gallon the output is 3.1611.8579.00 Note: Real per-mile cost would aiso include maintenance and depreciation. LABACtiviry7.13:1.LAB:Drivingcosts main.py Lood default temelate 1 mileage = floot ( input ())

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago