Mar-18-2020, 11:12 AM
(This post was last modified: Mar-18-2020, 11:14 AM by pyzyx3qwerty.)
first, you need to find the divisors of the number by using the modulo operator
use a for loop to make sure that divisor is less than the number
then inside the for loop make a while loop for every number less than the original one, and is divisible by it
inside the while loop, then print a statement to find the sum of all divisors
use a for loop to make sure that divisor is less than the number
then inside the for loop make a while loop for every number less than the original one, and is divisible by it
inside the while loop, then print a statement to find the sum of all divisors
pyzyx3qwerty
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs