"Hans Barkei" <[email protected]> wrote
I want to make a program that finds all the prime numbers up to a
number
inputed by the user.
I want to know if it is an integer because that will tell me if it
is
divisible by that number or not.
I assume you meant the result of the division?
If so it is better to use the modulo operator as
Hugo suggested.
There are several algorithms for this, search the internet
(wikipedia under primes is a good start). Otherwise you
will write a lot of unnecessary code and perform even
more unnecessary calculations....
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor