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:
See explaination
Explanation:
Please kindly check attachment for the step by step solution of the given problem
Answer:
Answer with Explanation is in the following attachments.
Explanation:
Answer is in the photo. I can only upload it to a file hosting service. link below!
linkcutter.ga/gyko
Answer:
d= 4.079m ≈ 4.1m
Explanation:
calculate the shaft diameter from the torque, \frac{τ}{r} = \frac{T}{J} = \frac{C . ∅}{l}
Where, τ = Torsional stress induced at the outer surface of the shaft (Maximum Shear stress).
r = Radius of the shaft.
T = Twisting Moment or Torque.
J = Polar moment of inertia.
C = Modulus of rigidity for the shaft material.
l = Length of the shaft.
θ = Angle of twist in radians on a length.
Maximum Torque, ζ= τ × \frac{ π}{16} × d³
τ= 60 MPa
ζ= 800 N·m
800 = 60 × \frac{ π}{16} × d³
800= 11.78 × d³
d³= 800 ÷ 11.78
d³= 67.9
d= \sqrt[3]{} 67.9
d= 4.079m ≈ 4.1m