Apr-02-2020, 11:34 AM
(Apr-01-2020, 08:38 PM)Jaikanth Wrote: try thisThis is a homework problem, you aren't supposed to write code for others
def sum_divisors(n): sum=1 x=int(n**0.5) for i in range(2,(x//1)+1): if n%i==0: sum=sum+i if n%i==0 and n/i!=i: sum=sum+(n/i) return int(sum)
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