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
What are Operating Systems?
horrorfan [7]

Answer:

the software that supports a computer's basic functions, such as scheduling tasks, executing applications, and controlling peripherals.

5 0
2 years ago
Verify (valid or not valid) using resolution the following reasoning: "Every student in the SCIS is a CS student or an IT studen
sveta [45]

Answer:

Please see the attached file for the complete answer.

Explanation:

Download pdf
8 0
3 years ago
What internet access technology currently uses a technology called 4G?
Leya [2.2K]
Phone wireless data plans.
8 0
3 years ago
What does UAS stand for
dezoksy [38]

Answer: Unmanned Aircraft Systems

Explanation:

8 0
2 years ago
Read 2 more answers
For each scenario, select the best solution to try from the drop-down menu. A computer will not connect to the network. An IP ad
Inessa05 [86]

Answer:

1) Check the switches, routers, and hubs.

2) Try logging off and on again.

3) Make sure everything is plugged in and turned on.

4) Restore files from backup versions.

Explanation:

Hope this helped!! :D

6 0
3 years ago
Other questions:
  • Which of the following is a useful policy to minimize waste and mistakes?
    6·1 answer
  • Consider the following scheduling problem. You are given a list of final exams F1,...,Fk tobescheduled,andalistofstudentsS1,...,
    10·1 answer
  • Which is the last step in conducting a URL search?
    5·2 answers
  • Your company received a call from a historical society inquiring about the possibility of networking a two-century-old building
    15·1 answer
  • Write the method makeNames that creates and returns a String array of new names based on the method’s two parameter arrays, arra
    9·1 answer
  • As you type your outline, click Demote to move a line of text
    13·2 answers
  • What does the Finder do?
    7·1 answer
  • Candice’s first job was at the grocery store making deli food. While in culinary school, she worked part time in a restaurant ki
    12·2 answers
  • Users of an access point share the transmission capacity of the access point. The throughput a user gets is called the ________.
    11·1 answer
  • When a chart is selected, numerous customization options can be found on which Chart Tools tabs?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!