Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Prime number calculator in python
SUBMITTED BY:
kn1ghtm4r3
DATE:
April 28, 2017, 3:34 p.m.
FORMAT:
Python 3
SIZE:
366 Bytes
Raw
Download
Tweet
HITS:
928
Go to comments
Report
def
is_prime
(
n
):
status
=
True
if
n
<
2
:
status
=
False
else
:
for
i
in
range
(
2
,
n
):
if
n
%
i
==
0
:
status
=
False
return
status
for
n
in
range
(
99990000
,
99999999
):
if
is_prime
(
n
):
if
n
==
97
:
print
n
else
:
print
n
,
","
,
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus