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]
3 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]3 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
What consist(s) of a series of related instructions that tells the computer what to do and how to do it
Ber [7]

Answer:

Software program.

Explanation:

Unlike hardware which describes physical entities of a computer, a software program or simply a program (or even simply, a software) is a set of instructions or data that commands the computer on specific tasks to be performed and how they (the tasks) are performed.  Examples of a software are internet browser applications such as Google Chrome, Internet Explorer, and Mozilla Firefox and graphics applications such as Photoshop and Corel Draw.

Hope this helps!

8 0
4 years ago
Label the parts of the plated salad.
sesenic [268]

Answer:

   3. Base (<em>under line</em>): usually a layer of salad greens that line the plate or bowl in which the salad will be served.

   2. Body (<em>main part</em>): consists of the main ingredients.

   1. Garnish: enhances the appearance while also complementing the overall taste; must be edible.

Dressing: liquid/ semi-liquid added to the body.

Explanation:

3 0
2 years ago
Your company wants to use an IoT device but wants to make sure it does not interfere with other RF devices that use the 2.4 GHz
jonny [76]

Answer:

C. Z-wave

Explanation:

The Z wave is a wireless communications protocol used primarily for automation. The Z- wave operates using a mesh network and then uses low energy radio waves to communicate from appliance to appliance.

The Z wave operates on a lower frequency than most other popular RF devices, thus making interference nonexistent.

The range of the Z-wave is 100m. Hence, it can give a perfect coverage from the base station to the company.

<em>Option A is wrong</em> . This is because the Zigbee is insecure and has a low coverage range (10m-20m). This means that there are possibilities of interference and also improper coverage beyond 50 m.

<em>Option B is wrong.</em> This is because Bluetooth devices are insecure, can loose connections under certain conditions. They have a range of 10m which is a lot lower than 50m benchmark.

<em>Option D is wrong</em>. NFC stands for Near Field Communication. This means its range is practically about 4cm and it cannot be used for long ranges as the company intends.

6 0
4 years ago
The processes of only seeing only some records frome data table is called as what​
Aliun [14]

Explanation:

For other uses, see Table. An example table rendered in a web browser using HTML. A table is an arrangement of data in rows and columns, or possibly in a more ... The first row is not . is called Html

5 0
3 years ago
Which type of classroom enables students to attend lectures without being physically present with the teacher?
Kisachek [45]
An online class? I think lol
5 0
4 years ago
Other questions:
  • In which section of a document would you include image acknowledgments for the images used ?
    8·2 answers
  • A coworker is concerned about the veracity of a claim because the sender of an email denies sending it. The coworker wants a way
    6·1 answer
  • What is the minimum internal temperature that the chicken must reach?
    11·1 answer
  • A free Linux forensics tool
    7·1 answer
  • What is a quasi vpn?
    14·1 answer
  • How many of yall are willing too sub to my channel called "Space Juice" with around 200 subs?!​
    6·1 answer
  • Python Question Class 11 attached below
    9·1 answer
  • Please help me on this it’s due now
    5·1 answer
  • What is output?<br> x = 2<br> y = 3<br> print (x * y + 2)<br> 4<br> 2<br> 8<br> 10
    7·1 answer
  • A _____ model is one that is automatically adjusted based on changing relationships among variables.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!