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
MrRa [10]
2 years ago
5

g Assignment 8: Driving costs Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon as input, a

nd output the gas cost for 20 miles, 75 miles, and 500 miles.
Computers and Technology
1 answer:
zavuch27 [327]2 years ago
5 0

Answer:

miles_gallon = float(input("Enter car's miles/gallon: "))

dollars_gallon = float(input("Enter gas dollars/gallon: "))

print("Gas cost for 20 miles is $", (20 / miles_gallon) * dollars_gallon)

print("Gas cost for 75 miles is $", (75 / miles_gallon) * dollars_gallon)

print("Gas cost for 500 miles is $", (500 / miles_gallon) * dollars_gallon)

Explanation:

*The code is in Python.

Ask the user to enter the car's miles/gallon and gas dollars/gallon

Calculate the gas cost for 20 miles, divide 20 by miles_gallon and multiply the result by dollars_gallon, then print it

Calculate the gas cost for 75 miles, divide 75 by miles_gallon and multiply the result by dollars_gallon, then print it

Calculate the gas cost for 500 miles, divide 500 by miles_gallon and multiply the result by dollars_gallon, then print it

You might be interested in
Does anyone know what anotmy means​
deff fn [24]

Answer:

also its spelled anatomy

Explanation:

The branch of science concerned with the bodily structure of humans, animals, and other living organisms, especially as revealed by dissection and the separation of parts.

Hope this helped :3

3 0
2 years ago
Read 2 more answers
Can you redact this image
spin [16.1K]

Answer:what???

Explanation:so

What

6 0
2 years ago
The main purpose of a honeypot is Select one:
masya89 [10]

Answer:

d. To help security professionals better understand and protect against threats to the system

Explanation:

The main purpose of a honeypot is to attract potential hackers and allow them to have access to a network system that is not the actual live network with close monitoring. This is done so as to learn and understand the intentions of the hacker and how they execute an attack. With this knowledge security professional are in a better position to deal with potential threats and keep the network secure.

4 0
2 years ago
a solid state drive is a removable flash memory device that you insert and remove from a slot in a computer, mobile device, or c
yulyashka [42]
It is true, Because all the the drives or memories which doesn't have a plates spinning like hard disk are called solid state drives.
4 0
2 years ago
What is the check digit for the following original product number: 140501941 ? *
Natasha_Volkova [10]

Explanation:

I think it is 7, but I could be wrong..... sorry

8 0
2 years ago
Read 2 more answers
Other questions:
  • The Internet has made it possible for most people to order all of their clothing online. While this may be a preference for some
    5·1 answer
  • Which component is the smallest unit in a spreadsheet?
    14·2 answers
  • It is essential that a security professional is able to resolve and respond to cyber law inquiries and incidents while avoiding
    14·1 answer
  • Define a romanNumberToInt function that converts a RomanNumber value, which is a list of Roman digits, into an integer. Hints: -
    7·1 answer
  • Which leader of the Jamestown colony am I?
    15·2 answers
  • .What particular skills does a team leader need in addition to the other skills needed by any team member. (choose all that appl
    6·1 answer
  • Which of the following demonstrates the proper way to specify a variable-length argument list?
    7·1 answer
  • What is Patch tool ???<br><br>​
    15·2 answers
  • Arrange the binary number in increasing order of their arithmetic output in the decimal number system ?
    9·1 answer
  • Need answer ASAP
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!