Apr-03-2019, 01:30 AM
I would have used
Also, your code does work right. It returns False for 6. Going to the sqrt(n) is fine for checking for primes, but if you need all of the divisors it's going to miss lots.
not number % divisor
, and not bothered with the divides function.Also, your code does work right. It returns False for 6. Going to the sqrt(n) is fine for checking for primes, but if you need all of the divisors it's going to miss lots.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures