Answer:
Insert
'try:' at line 1
'except:' at line 3
Explanation:
The "try and except" commands in Python are used for exception handling.
try: the statements under this block are executed normally
except: the the statements under this block are executed when there is an exception.
We can use these commands to handle errors, for example, in the given scenario we don't want the user to enter a floating point number such as
1.5, 2.6 etc.
When the user enters an integer number then the except command is not executed.
When the user enters a floating point number then the except command is executed, program is stopped and error message is shown that is at line 4
Python code:
# line 1
try:
# line 2
age = int(input("Enter your age: "))
# line 3
except:
# line 4
print("Invalid input")
Output:
Test 1:
Enter your age: 20
Test 2:
Enter your age: 20.5
Invalid input
Answer:
Check the explanation
Explanation:
Kindly check the attached image below to see the step by step explanation to the question above.
Answer:
<em>The main sources of error in the collection of data are as follows : Due to direct personal interview. Due to indirect oral interviews. Information from correspondents may be misleading.</em>
2.4 is the correct answer .
125 ÷ 52
Answer:
Poissons ratio = -0.3367
Explanation:
Poissons ratio = Lateral Strain / Longitudinal Strain
In this case, the longitudinal strain will be:
Strain (longitudinal) = Change in length / total length
Strain (longitudinal) = (8.40392 - 8.4) / 8.4
Strain (longitudinal) = 4.666 * 10^(-4)
While the lateral strain will be:
Strain (Lateral) = Change in length / total length
Strain (Lateral) = (2.09967 - 2.1) / 2.1
Strain (Lateral) = -1.571 * 10^(-4)
Solving the poisson equation at the top we get:
Poissons ratio = -1.571 / 4.666 <u>( 10^(-4) cancels out )</u>
Poissons ratio = -0.3367