On Sun, Apr 5, 2020 at 10:35 PM Orges Leka <orges.l...@gmail.com> wrote: > > You can try the following: > It is based on trial division and very slow, compared to the state of the > art: >
I think it's more helpful to assist the OP in learning coding, rather than provide a completely different function to do a similar purpose :) I strongly suspect that the OP is doing this prime number finder as part of learning Python, not as a means of actually finding prime numbers. BTW, you may want to be careful of mixing floats and ints. It's generally safest to stick to just integers - fewer things to have to think about. ChrisA -- https://mail.python.org/mailman/listinfo/python-list