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
galben [10]
3 years ago
10

The fractional_part function divides the numerator by the denominator, and returns just the fractional part (a number between 0

and 1). Complete the body of the function so that it returns the right number. Note: Since division by 0 produces an error, if the denominator is 0, the function should return 0 instead of attempting the division.

Engineering
1 answer:
Kisachek [45]3 years ago
4 0

Answer:

Here is the fractional_part() function:

def fractional_part(numerator, denominator):

   if denominator != 0:

       return (numerator % denominator)/denominator

   else:

       return 0

Explanation:

I will explain the code line by line.

The first statement it the definition of function fractional_part() which takes two parameters i.e. numerator and denominator to return the fractional part of the division.

Next is an if statement which checks if the value of denominator is 0. If this is true then the function returns 0. If this condition evaluates to false which means that the value of denominator is not 0 then return (numerator % denominator)/denominator  is executed. Now lets see how this statement works with the help of an example.

Lets say the value of numerator is 5 and denominator is 4. (numerator % denominator)/denominator will first compute the modulus of these two values. 5 % 4 is 1 because when 5 is divided by 4 , then the remainder is 1. Now this result is divided by denominator to get the fractional part. When 1 is divided by 4 the answer is 0.25. So this is how we get the fractional part which is 0.25.  

The program with output is attached.

You might be interested in
Dcfxvfsvcfsfvfssvdaeeaew
Ainat [17]

Answer:

meepus weepus

Explanation:

8 0
3 years ago
Read 2 more answers
A product whose total work content time = 50 min is assembled on a manual production line at a rate of 24 units per hour. From p
valentinak56 [21]

Answer:

a)Cycle time = 2.37 min

b)Numbers of workers =21

c)Stations on the line =24

Explanation:

Given that

Total work content time(TWC) = 50 min

Production rate Rp= 24 units/hr

manning level will be close =1.5

Line balancing efficiency =0.94

a)

Cycle time

T_c=\dfrac{60E}{R_P}

T_c=\dfrac{60\times 0.95}{24}

Cycle time = 2.37 min

b)

Numbers of workers ,W

W=\dfrac{TWC}{T_c}

W=\dfrac{50}{2.37}

W= 21

Numbers of workers =21

c)

Stations on the line(n)

Lets find service time Ts

Ts = Cycle time -  Time for repositioning

Ts = Tc- Tr

Ts= 2.37  - 9/ 60 min

Ts= 2.22 min

We  know that efficiency

\eta=\dfrac{TWC}{n.T_s}

0.94=\dfrac{50}{n\times 2.22}

n=23.94  ⇒n=24

n=24

Stations on the line =24

7 0
3 years ago
When comparing solids to fluids, the following is true: for elastic solids, the stress must be normal. For Newtonian fluids, the
Nat2105 [25]

Answer: D

Find the answer in the explanation

Explanation:

Elastic solid will obey Hooke's law which state that the force applied is proportional to the extension provided the elastic limit is not exceeded.

Examples of Newtonian fluid are water, glycerol, honey and all organic solvents

When comparing solids to fluids, the below statement is true

We can therefore conclude that

For elastic solids, stress is linearly related to strain, and for Newtonian fluids, stress is linearly related to strain rate

4 0
4 years ago
A 600 MW coal-fired power plant has an overall thermal efficiency of 38%. It is burning coal that has a heating value of 12,000
velikii [3]

Answer:

See step by step explanations for answer.

Explanation:

600 megawatts =

568 690.272 btu / second

thermal eficiency=work done/Heat supllied

0.38=568690.272/Heat supplied

Heat supplied=1496553.35btu /s

heat emmitted to the atmosphere=heat supplied -work done=(1496553.35-568690.272)=927863.1 btu/s

feed rate=(1496553.35)/12000=124.71 lb/s =10775184.1056 lb/day=5 387.472 ton / day

sulphur content released=(0.03*124.71)/(1.496553)=2.5 lb SO2/million Btu of heat input

so

the degree (%) of sulfur dioxide control needed to meet an emission standard=(2.5/0.15)*100=1666.67 %

the CO2 emission rate=220*(1.496553) =329.241 lb/s =12 903.0802 metric ton / day

5 0
3 years ago
If the reading of mercury manometer was 728 mmHg, what is the reading for another liquid such as water in mH20 units?​
vodka [1.7K]

Answer:

mH275 units

Explanation:

  • that was true
4 0
3 years ago
Other questions:
  • What is the average linear (seepage) velocity of water in an aquifer with a hydraulic conductivity of 6.9 x 10-4 m/s and porosit
    13·1 answer
  • Народ творець української пісні
    15·1 answer
  • Assume a 100-m tape measures 3 mm too short. Five measurements of a distance give results of 253.294, 253.287, 253.289, 253.284,
    12·1 answer
  • please help will give brainliest Explain why having personal protection equipment (PPE), such as masks, gloves, and suits, is a
    14·1 answer
  • Weight limit for a pallet
    15·2 answers
  • In a CNC machining operation, the has to be moved from point (5, 4) to point(7, 2)along a circular path with center at (7,2). Be
    5·1 answer
  • Marks
    7·1 answer
  • Construction lines are thick lines true false
    11·2 answers
  • If a system of pulleys results in a force of 25% of the load, how far will the rope need to move to pull the load a distance of
    15·1 answer
  • HELP PLEASE ! TYYYY!!!!!!!!!!!!!!!!!!!!!!!!
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!