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 was used to enhance silent films of the early 1900s
alisha [4.7K]
Ask internet it will tell u
7 0
2 years ago
A(n) _______________ is a collection of configuration and security settings that an administrator has created in order to apply
ioda

Answer:

Profile

Explanation:

<em>A </em><em>profile </em><em>is a collection of configuration and security settings that an administrator has created in order to apply those settings to particular categories of users or devices. </em>

Profile Security Requirements are very important in order to define the levels of protection. Every particular profile counts on its predefined rules. Such set of rules either allow or deny in order to having access to the computer and the type of access to be granted to the user profile in the computer.

6 0
3 years ago
How hot is to hot for my computer?
satela [25.4K]
Set your room to 69 degrees making your processor run at a smoother rate because of the cooler outer walls, I would say the hottest you can go is 230-248 degrees!
4 0
2 years ago
Read 2 more answers
When planning your educational and career path, it makes sense to consider where you want to work and what type of work you want
Gekata [30.6K]
Well i think it is true
6 0
2 years ago
TRUE OR FALSE, databases allow you to search for content on the internet based on certain criteria (PLS ANSWER RIGHT)
tester [92]

I'm pretty sure the answer is true. If the criteria it means is like the text you search and the like, then it's true. If this helped, please give me brainiest!

7 0
3 years ago
Read 2 more answers
Other questions:
  • Discus the pros and cons of Internal cloud service and External cloud service for both Infrastructure as a service and Applicati
    11·1 answer
  • What is the basic difference between a printer and a plotter?​
    12·1 answer
  • Line spacing refers to the amount of space between each line in a paragraph. A. True B. False
    14·2 answers
  • An anagram is a word or a phrase made by transposing the letters of another word or phrase; for example, "parliament" is an anag
    7·1 answer
  • Which value can be entered to cause the following code segment to display the message: "That number is acceptable." int number;
    11·1 answer
  • Thank you very much for your email. ...... was very interesting​
    15·1 answer
  • Clarice is an architect who is involved in design work on a restaurant in a building that used to be part of the city’s water wo
    8·1 answer
  • The RAND() function in Excel returns a pseudo-random number between 0 and 1. If you enter this function into 1000 cells (i.e. en
    5·1 answer
  • Write a definition in your own words for intranet. Please don't copy and paste.
    7·2 answers
  • Without using parentheses, enter a formula in cell F4 that
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!