answer.
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
denis23 [38]
2 years ago
15

2.13 LAB: Driving costs Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as

input, and output the gas cost for 20 miles, 75 miles, and 500 miles. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f} {:.2f} {:.2f}'.format(your_value1, your_value2, your_value3)) Ex: If the input is: 20.0
Engineering
2 answers:
SOVA2 [1]2 years ago
4 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:

hichkok12 [17]2 years ago
3 0

Answer:

The code for this question will be:

#include <iostream>

using namespace std;

 double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon) {

 

 double dollarCost = 0;

 dollarCost = (dollarsPerGallon * drivenMiles) / milesPerGallon; //calculates total cost

 

 return dollarCost;

}

int main() {

  double mileGallon = 0;

  double dollarGallon = 0;

  cin >> mileGallon;

  cin >> dollarGallon;

 

  cout << DrivingCost(10, mileGallon, dollarGallon) << " ";

  cout << DrivingCost(50, mileGallon, dollarGallon) << " ";

  cout << DrivingCost(400, mileGallon, dollarGallon) << endl;

   

  return 0;

}

You might be interested in
Technician A says that the most efficient method of EVAP system leak detection is introducing smoke under low pressure from a ma
Inessa05 [86]

Answer:

does anyone know this answer???

Explanation:

3 0
2 years ago
A charge of 2.0 × 10–10 C is to be stored on each plate of a parallel-plate capacitor having an area of 650 mm2 (1.0 in.2 ) and
IgorLugansk [536]

Answer: a) 43.7 V b) 153 V c) a) 5 pf b) 1.43 pf d) 0.34 μC/m²

              e) 0.24 μC/m²

Explanation:

a) By definition, the capacitance is given by the following relationship between the charge on one of the plates, and the voltage between them:

C= Q/V

For a parallel-plate capacitor, C is also obtained as a constant given by the geometry and the material of the dielectric, as follows:

C= εA/d, where A is the area of one of the plates, and d the separation between them.

ε refers to the permitivitty of the dielectric material, and is related with the dielectric constant of the material, as follows:

ε = ε₀ .εr , where ε₀ = 8.85. 10⁻¹² farad/m, and εr = 3.5

Equating both expressions for C, and solving for V, we have:

V = Q. d / ε₀ εr A

Replacing for the values, we finally arrive to this value for V:

V = 43.7 V

b) If we look to the expression for C, that depends on ε, for vacuum, εr=1, so same considerations apply, and we find the new value for V, as follows:

V = 43.7 x 3.5 = 153 V

c) Applying the definition of capacitance, and assuming that charge on the plates remains constant, as voltage can be obtained from a) and b) above. we get:

C1 = 5 pF

C2 = 1.43 pF

d) Applying Gauss' Law, and the definition of electric flux, it can be showed that there exist a relationship between the dielectric displacement D and the electric field E, as follows:

D = εE =ε₀εrE

In a capacitor, the electric field (assumed constant) is related with the voltage between plates, as follows:

E = V/d where d is the separation between plates.

So we can find D, replacing E by V/d, so we have:

D = (ε₀εrV)/d=8.85. 10⁻¹² F/m.3.5. 43.7 V / 4.10⁻³ m = 0.34 μC/m²

e) When a dielectric is put in a place where an electric field is present, it is produced a relative reorientation of his atoms, causing an internal electric field that opposes to the external one, reducing his effect overall.

One way to explain this, is due to the existence of an internal field, representented by a vector called polarization, that is related with the dielectric displacement and the electric field as follows:

D = ε₀E + P

P = D - ε₀E

With the values for D and E from d) above, we get P:

P = 0.24 μC / m²

6 0
2 years ago
1. Which type of sketch most accurately represents what the finished product will look like?
a_sh-v [17]

Answer:

1. The correct answer is B. Ideations Sketch

2. The correct answer is A. How a product actually works  

Explanation:

1. The correct answer is B. Ideations Sketch

Due to the fact that in the process sketch the idea is to show all the steps that need to be followed to achieve or construct the final product, in the persuasive sketch it is intended to know about the possible influence over the audience and make them want the design notion, in the explanatory sketch what is wanted is to communicate about the structure, function and form in a clear way focusing on how it would be possible to use the product or idea design; and finally in the ideations sketch is used to propose solutions to any concer, in this way the concept is to create a prototype of what the final product would be.  

2. The correct answer is A. How a product actually works  

Because the word function comes from the latin function which means “to perform”. This lead us to define function as the capacity to perform an activity that a product or idea has or what it can do for a consumer or customer.

7 0
2 years ago
Vehicles arrive at a single toll booth beginning at 8:00 A.M. They arrive and depart according to a uniform deterministic distri
jok3333 [9.3K]

Answer:

Explanation:

answers attached bellow

6 0
2 years ago
The rectangular frame is composed of four perimeter two-force members and two cables AC and BD which are incapable of supporting
Rama09 [41]

Answer:

Your question is lacking some information attached is the missing part and the solution

A) AB = AD = BD = 0, BC = LC

    AC = \frac{5L}{3}T, CD = \frac{4L}{3} C

B) AB = AD = BC = BD = 0

   AC = \frac{5L}{3} T, CD = \frac{4L}{3} C

Explanation:

A) Forces in all members due to the load L in position A

assuming that BD goes slack from an inspection of Joint B

AB = 0 and BC = LC from Joint D, AD = 0 and CD = 4L/3 C

B) steps to arrive to the answer is attached below

AB = AD = BC = BD = 0

AC = \frac{5L}{3} T,  CD = \frac{4L}{3}C

7 0
2 years ago
Other questions:
  • Water is the working fluid in an ideal Rankine cycle. The condenser pressure is 8 kPa, and saturated vapor enters the turbine at
    10·1 answer
  • Your assignment is to write a menu driven program. The menu will be responded to using a switch statement. The menu options (cas
    6·1 answer
  • An uninsulated, thin-walled pipe of 100-mm diameter is used to transport water to equipment that operates outdoors and uses the
    9·1 answer
  • Define initial set and final set. Briefly discuss one method used to determine them. The following laboratory tests are performe
    12·1 answer
  • In this module you learned about searching, sorting and algorithms in C++ and how to implement these elements in your C++ progra
    6·1 answer
  • Oil enters a counterflow heat exchanger at 600 K with a mass flow rate of 10 kg/s and exits at 200 K. A separate stream of liqui
    12·1 answer
  • 10. A maker of micromechanical systems can reduce product recalls by 10% with the installation of new packaging equipment. If th
    9·1 answer
  • According to the EWR specifications, ___ is responsible for picking up and disposing of debris or rubbish from
    15·1 answer
  • The typical Canadian worker is able to produce 100 board feet (a unit of measure) of lumber or 1000 light bulbs per year. The wo
    12·1 answer
  • What term describes a guardrail system
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!