On Jul 23, 9:14 pm, mzdude <[EMAIL PROTECTED]> wrote:
> On Jul 23, 6:30 pm, Samir <[EMAIL PROTECTED]> wrote:
>
> > Hi Everyone,
>
> > def findSumOfDivisor(n):
>
> > return sum(divisor) # fine using function sum()
>
> > sum = findSumOfDivisor(i) # then find the sum o
On Jul 23, 6:30 pm, Samir <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
>
> def findSumOfDivisor(n):
> return sum(divisor) # fine using function sum()
>
> sum = findSumOfDivisor(i) # then find the sum of its divisors
oops redefine what sum is.
>>> x = [1,2]
>>> sum
On 24 Juli, 00:30, Samir <[EMAIL PROTECTED]> wrote:
> from math import sqrt
>
> def findSumOfDivisor(n):
[...]
> return sum(divisor) # return the sum of the
> divisors
> for i in range(2,10): # loop through integers 2
> through 9
[...]
> sum = findSumOfD
Hi Everyone,
In order to get a better command of Python, I have been trying to
solve the puzzles on the Project Euler web site. I've made my way
down to problem 21:
http://projecteuler.net/index.php?section=problems&id=21
I've created a function (findSumOfDivisor), that when passed an
integer, w