The
piston engine uses the crankshaft to convert the reciprocating motion of the
piston into rotary motion.
<span>The
crankshaft is used to convert reciprocating motion of the piston into rotary
motion, while the conversion process is called torque, which is a twisting
force. Aside from crankshaft, there are a total of four parts of the engine
that work together in order to convert the reciprocating motion into rotary
motion namely cylinder, or also called the chamber of the piston, the piston itself,
and the connecting rod.</span>
Answer:
Written in Python
for num in range(1,1001):
sum=0
for j in range(1,num+1):
if num%j==0:
sum = sum + j
if num == sum:
print(str(num)+" is a perfect number")
Explanation:
This line gets the range from 1 to 1000
for num in range(1,1001):
This line initializes sum to 0 for each number 1 to 1000
sum=0
This line gets the divisor for each number 1 to 1000
for j in range(1,num+1):
This following if condition line checks for divisor of each number
<em> if num%j==0:
</em>
<em> sum = sum + j
</em>
The following if condition checks for perfect number
if num == sum:
print(str(num)+" is a perfect number")