Answer:
The solution code is written in Python.
- def largest3(num1, num2, num3):
- largest = num1
- if(largest < num2):
- largest = num2
-
- if(largest < num3):
- largest = num3
-
- return largest
- first_num = int(input("Enter first number: "))
- second_num = int(input("Enter second number: "))
- third_num = int(input("Enter third number: "))
- largest_number = largest3(first_num, second_num, third_num)
- print("The largest number is " + str(largest_number))
Explanation:
<u>Create function largest3</u>
- Firstly, we can create a function <em>largest3 </em>which take 3 numbers (<em>num1, num2, num3</em>) as input. (Line 1).
- Please note Python uses keyword <em>def </em>to denote a function. The code from Line 2 - 10 are function body of <em>largest3</em>.
- Within the function body, create a variable,<em> largest</em>, to store the largest number. In the first beginning, just tentatively assign<em> num1 </em>to<em> largest</em>. (Line 2)
- Next, proceed to check if the current "<em>largest</em>" value smaller than the<em> num2 </em>(Line 4). If so, replace the original value of largest variable with <em>num2</em> (Line 5).
- Repeat the similar comparison procedure to<em> </em><em>num3</em> (Line 7-8)
- At the end, return the final value of "<em>largest</em>" as output
<u>Get User Input</u>
- Prompt use input for three numbers (Line 13 -15) using Python built-in <em>input</em> function.
- Please note the input parts of codes is done outside of the function <em>largest3</em>.
<u>Call function to get largest number and display</u>
- We can simply call the function<em> largest </em>by writing the function name <em>largest</em> and passing the three user input into the parenthesis as arguments. (Line 17)
- The function <em>largest </em>will operate on the three arguments and return the output to the variable <em>largest_number</em>.
- Lastly, print the output using Python built-in <em>print</em> function. (Line 18)
- Please note the output parts of codes is also done outside of the function<em> largest3</em>.
Known :
D = 12 in = 1 ft
L = 850 ft
Q = 5.6 cfs
hA = 750 ft
hB = 765 ft
PA = 85 psi = 12240 lb/ft²
Solution :
A = πD² / 4 = π(1²) / 4
A = 0.785 ft²
<u>Velocity of water :</u>
U = Q / A = 5.6 / 0.785
U = 7.134 ft/s
<u>Friction loss due to pipe length :</u>
Re = UD / v = (7.134)(1) / (0.511 × 10^(-5))
Re = 1.4 × 10⁶
(From Moody Chart, We Get f = 0.015)
hf = f(L / d)(U² / 2g) = 0.015(850 / 1)((7.134²) / 2(32.2))
hf = 10 ft
PA + γhA = PB + γhB + γhf
PB = PA + γ(hA - hB - hf)
PB = 12240 + (62.4)(750 - 765 - 10)
PB = 10680 lb/ft²
PB = 74.167 psi
Answer:
A. smallest wire is No. 12
Answer:
Die of intoxication by water first
Explanation:
We assume that the weight of the man is 154.35 pounds which is 70 kg
LD50 water = 90g per kg
Maximum concentration = 90x70
= 6300grams
Convert grams to liters
6300/100
= 6.3 litres
From here we get amount of kool aid
6.3 x 1.97x10^-4
= 1.24x10^-3
= 1.24grams
1.24 grams is below 420 kool aid is lower than LD50 with about 6 grams for 1 kg (6x70kg = 420). So 420 is lethal dose. But 1.24 is less than this so the man has to die of water intoxication first.