Answer:
for i in range(0,10):
if SimonPattern[i] == UserPattern[i]:
score = score + 1
i = i + 1
else:
break
if i == 9:
score = score + 1
print("Total Score: {}".format(score))
Explanation:
This for loop was made using Python. Full code attached.
- For loop requires a range of numbers to define the end points. For this Simon Says game, we are talking about 10 characters, so that must be the range for the for loop: from 0 to 10.
- Conditional if tests if Simon pattern matches User's one characheter by one and add point for each match.
- Break statement is ready to escape the for loop at first mismatch.
- As we are starting from index 0, if the users matched all the characters correctly, then we need to add 1, otherwise the maximun score would be 9 and it should be 10.
Answer with Explanation:
The modulus of elasticity has an profound effect on the mechanical design of any machine part as explained below:
1) Effect on the stiffness of the member: The ability of any member of a machine to resist any force depends on the stiffness of the member. For a member with large modulus of elasticity the stiffness is more and hence in cases when the member has to resist a direct load the member with more modulus of elasticity resists the force better.
2)Effect on the deflection of the member: The deflection caused by a force in a member is inversely proportional to the modulus of elasticity of the member thus in machine parts in which we need to resist the deflections caused by the load we can use materials with greater modulus of elasticity.
3) Effect to resistance of shear and torque: Modulus of rigidity of a material is found to be larger if the modulus of elasticity of the material is more hence for a material with larger modulus of elasticity the resistance it offer's to shear forces and the torques is more.
While designing a machine element since the above factors are important to consider thus we conclude that modulus of elasticity has a profound impact on machine design.
Answer:
The surface area of the primary settling tank is 0.0095 m^2.
The effective theoretical detention time is 0.05 s.
Explanation:
The surface area of the tank is calculated by dividing the volumetric flow rate by the overflow rate.
Volumetric flow rate = 0.570 m^3/s
Overflow rate = 60 m/s
Surface area = 0.570 m^3/s ÷ 60 m/s = 0.0095 m^2
Detention time is calculated by dividing the volume of the tank by the its volumetric flow rate
Volume of the tank = surface area × depth = 0.0095 m^2 × 3 m = 0.0285 m^3
Detention time = 0.0285 m^3 ÷ 0.570 m^3/s = 0.05 s