I'm having a hard time finding the count of divisors that are even. Help anybody?
Here's my code. The output is suppose to count the number of even divisors the range has. def evenCount(b) : for n in range(x, y+1) : count = 0 if n % 2 == 0 : count += n/3 count % n == 1 return n ### main #### x = input("Enter a starting value: ") y = input("Enter a stopping value: ") count = evenCount(x) for n in range(x, y+1) : count = 0 if n % 2 == 0 : count += n/3 print "%2d: " %n, "has%2d" %count, "even divisors", else : print "%2d: " %n, "has 0 even divisors", print
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor