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
Dvinal [7]
4 years ago
12

One lap around a standard high-school running track is exactly 0.25 miles. Write the function miles_to_laps() that takes a numbe

r of miles as an argument and returns the number of laps. Complete the program to output the number of laps. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value)) Ex: If the input is: 1.5 the output is: 6.00 Ex: If the input is: 2.2 the output is: 8.80 Your program must define and call the following function: def miles_to_laps(user_miles)
Engineering
2 answers:
hodyreva [135]4 years ago
8 0

Answer:

Java.

Explanation:

import java.util.Scanner;

///////////////////////////////////////////////////////////

public class MyClass {

   static void miles_to_laps(float miles) {

       double laps = miles/0.25;

       System.out.printf("Number of laps: %s", String.format("%.2f", laps));

   }

///////////////////////////////////////////////////////////

   public static void main(String args[]) {

       System.out.print("Enter miles: ");

       Scanner input = new Scanner(System.in);

       float miles = input.nextFloat();

       if (miles < 0) {

           System.out.println("Invalid input");

       }

       else

           miles_to_laps(miles);

   }

}

I have used the Scanner library for user input.

MatroZZZ [7]4 years ago
7 0

Answer:

def miles_to_laps(user_miles):

return user_miles/0.25

if __name__ == '__main__':

miles = float(input(""))

lap = miles_to_laps(miles)

print("%.2f"%lap)

Explanation:

because it works.

You might be interested in
When you apply for your driver license, you consent to take a ____ test when asked to do so by a law enforcement officer. memory
n200080 [17]

Answer:

Driving test

Explanation:

Usually according to laws in countries worldwide, to be licenced to drive, one is required to go through a driving school to learn the ethics and rules of driving.

4 0
2 years ago
Consider an ideal cogeneration steam plant to generate power and process heat. Steam enters the turbine from the boiler at 7 Mpa
igomit [66]

Answer:

1. The diagram T-s or H-s is attached to this answer.

2. The fraction of the steam extracted is 4.088Kg/s

3. The net Power produced per kg of steam exiting the boiler is 1089.5KJ/Kg.

4. The mass flow rate of steam supplied by the boiler is 16.352Kg/s

5. the net power produced by the plant is 11016.2KJ/s.

6. The utilization factor is 0.218.

Explanation:

To analyze this problem we need to find all the thermodynamic coordinates of the system. In the second image attached to this answer, we can see the entire ideal cogeneration steam plant system.

From a water thermodynamic properties chart, we can obtain the information for each point.

+ Steam enters the turbine from the boiler at 7 Mpa and 500 degrees C:

h₆=3410.56KJ/Kg

s₆=6.7993 KJ/Kg

This is an ideal cogeneration steam system, therefore: s₆=s₇=s₈

+One-fourth of the steam is extracted from the turbine at 600-kPa:

h₇(s₇) = 2773.74 KJ/Kg (overheated steam)

+The remainder of the steam continues to expand and exhausts to the condenser at 10 kPa.

h₈(s₈)=2153.58 KJ/Kg (this is wet steam with title X=0.8198)

h₁(P=10Kpa)= 191.83 KJ/Kg (condensed water) s₁=0.64925KJ/Kg

-This flow is pumped to 600KPa, so:

s₂=s₁

h₂(s₂)=192.585KJ/Kg

+The steam extracted for the process heater is condensed in the heater:

h₃(P=600KPa)=670.42KJ/Kg (condensed water)

+The steam extracted for the process heater is condensed in the heater and mixed with the feed-water at 600 kPa:

The mixing process of the flow of point 2 and 3 is an adiabatic process, therefore:

\dot{Q}_4=\dot{Q}_2+\dot{Q}_3=\dot{m}_2 h_2+\dot{m}_3h_3\\\dot{m}_4 h_4=\dot{m}_2 h_2+\dot{m}_3h_3=\dot{m}_2 0.75h_4+\dot{m}_30.25h_4\\h_4=0.75h_2+0.25h_3=312.043KJ/Kg

s₄=1.02252

+the mixture is pumped to the boiler pressure of 7 Mpa:

s₅=s₄

h₅(s₅)=323.685KJ/Kg

1)Now we have all the thermodynamic coordinates and we can draw the diagram of the system.

2) To determine the fraction of steam, the mass flow that is extracted from the turbine at state 7, we use the information that this flow is used to generate 8600KJ/s in a process of heat. Therefore:

P=8600KJ/s=\dot{m}_{3-7}(h_7-h_3)\\\dot{m}_{3-7}=8600KJ/s/(h_7-h_3)=4.088Kg/s

3)The net power produced per kg of steam exiting the boiler can be obtained as the rest between all the power obtained in the turbine less the power used in the pumps:

P_{turb}/Kg=(h_6-h_7)+0.75(h_7-h_8)=1101.94KJ/Kg\\P_{pump1}/Kg=h_2-h_1=0.755KJ/kg\\P_{pump2}/kg=h_5-h_4=11.642KJ/Kg\\P_{net}/kg=P_{turb}-P_{pump1}-P_{pump2}=1089.543KJ/Kg

4) To determine the mass flow rate of steam that must be supplied by the boiler, we only have to remember that the flow used in point 2) is a fourth of the total flow. therefore:

0.25\dot{m}_{tot}=\dot{m}_{3-7}\\\dot{m}_{tot}=4\dot{m}_{3-7}=16.352Kg/s

5)The net power supplied by the plant is the net power calculated in point 3) less the power used in the heat process 7-3:

P_{net sys}=P_{net}/kg \cdot \dot{m}_t-6800Kj/s=11016.2KJ/s

6) The utilization factor is obtained as the division between net power supplied by the plant and the power used to heat the steam. In this case:

UF=P_{net sys}/P_{boil}=P_{net sys}/[\dot{m}_t(h_6-h_5)]=0.21

3 0
3 years ago
Read the following statement.
alekssr [168]
The correct answer is A
5 0
4 years ago
Read 2 more answers
Guys, I need help. Describe carburetion as it applies to the four-stroke engine.
marta [7]

Answer:

(NH4)2Cr2O7→Cr2O3+N2+4H2O

Explanation:

(NH4)2Cr2O7→Cr2O3+N2+4H2O

7 0
3 years ago
Input signal to a controller is​
alexgriva [62]

Answer:

were the cord plugs in

Explanation:

4 0
3 years ago
Other questions:
  • Which allows a user to run applications on a computing device? Group of answer choices Application software CSS Operating system
    11·1 answer
  • In software engineering how do you apply design for change?
    13·1 answer
  • 2. A thin vertical panel L = 3 m high and w = 1.5 m wide is thermally insulated on one side and exposed to a solar radiation flu
    10·1 answer
  • Training is a way for employers to provide ____ to enable employees to protect themselves and others from injuries.
    9·2 answers
  • What color is an orange? its for my 8th grade
    13·1 answer
  • When an object is plumb, it is _____.
    11·2 answers
  • Shane's 100-watt radio draws 7 amps of current on a 120-volt circuit. What is the resistance in the radio?
    7·1 answer
  • What type of engineer would be most likely to develop a design for cars? chemical civil materials mechanical
    13·1 answer
  • A 10 kg mass is lifted to a height of 2 m What is the potiental energy at this position
    13·1 answer
  • !!!!!!!!!!!!!!PLEASE ANSWER THIS!!!!!!!!!!!!!!!!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!