1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Arlecino [84]
3 years ago
12

Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the ga

s cost for 10 miles, 50 miles, and 400 miles.
Ex: If the input is 20.0 3.1599, the output is:

1.57995 7.89975 63.198

Needs to be in Coral language
Computers and Technology
2 answers:
Tems11 [23]3 years ago
8 0

Answer:

def driving_cost(driven_miles, miles_per_gallon, dollars_per_gallon):

  gallon_used = driven_miles / miles_per_gallon

  cost = gallon_used * dollars_per_gallon  

  return cost  

miles_per_gallon = float(input(""))

dollars_per_gallon = float(input(""))

cost1 = driving_cost(10, miles_per_gallon, dollars_per_gallon)

cost2 = driving_cost(50, miles_per_gallon, dollars_per_gallon)

cost3 = driving_cost(400, miles_per_gallon, dollars_per_gallon)

print("%.2f" % cost1)

print("%.2f" % cost2)

print("%.2f" % cost3)

Explanation:

Ierofanga [76]3 years ago
6 0

Answer:

x^{2} \left[\begin{array}{ccc}1&2&3\\4&5&6\\7&8&9\end{array}\right] \int\limits^a_b {x} \, dx  \lim_{n \to \infty} a_n \sqrt{x} \sqrt[n]{x} \pi \alpha \frac{x}{y} x_{123} \beta

Explanation:

You might be interested in
An icon in a document preset that looks like the play button on a YT video, what type of document is the preset meant to be used
zloy xaker [14]
The answer is film and video
8 0
3 years ago
Read 2 more answers
What can a user modify on a business card using the Edit Business Card dialog box? Check all that apply.
vredina [299]

Answer:

layout,image,font,background color,

Explanation: i just did it on edge

7 0
3 years ago
If a person communicates indirectly and attaches little value to
Mars2501 [29]

Answer: B. Low-context

5 0
3 years ago
What is data anayltics
Lena [83]
Data analytics<span> (DA) is the science of examining raw </span>data<span> with the purpose of drawing conclusions about that information. </span>Data analytics<span> is used in many industries to allow companies and organization to make better business decisions and in the sciences to verify or disprove existing models or theories.</span>
7 0
3 years ago
Difference between customized and packaged software​
docker41 [41]

Packaged software is a compilation of programs which are grouped together in order to provide publicly with different tools in the same group.

Custom software is a specific program that are advanced for a goal in a department or in a company.

5 0
2 years ago
Other questions:
  • You would like to arrange the records alphabetically. You should _____.
    7·2 answers
  • A person planning to file for bankruptcy must receive credit counseling within two years before filing the petition.
    7·1 answer
  • You have a hard disk that is formatted with the fat32 file system. you would like to implement file and folder permissions on th
    10·1 answer
  • A web browser allows you to manage computer files and programs true false
    15·1 answer
  • Which encryption standard goes with the WPA2 protocol?<br> AES<br> DES<br> TKIP<br> WPS
    10·1 answer
  • Which type of market are you in if your firm, along with three other firms, controls 95% of the total music industry?
    13·1 answer
  • Write a C++ program that allows the user to enter double values. Display one of two messages: "The first number you entered is l
    9·1 answer
  • Your team will write a function that reverses a C-string, to practice using pointers. You must use pointers and C-strings for th
    6·1 answer
  • Dunbar's number, 150, refers to the number of:
    5·1 answer
  • Why are pirated software considered a threat?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!