Infinity Prime Number Calculation on Python

Infinity Prime Number Calculation on Python




Hi friends
Another Interesting program
If you print prime numbers without stop...
Solution is here


Simple code make it for us...


CODE:


----

a = 2
count = 1
while True:
  for i in range(2,a+1):
    if a % i == 0:
      if a == i:
        print(count,a)
        count += 1
      else:
        break
  a += 1


----


By
PyKAR

Comments

Popular posts from this blog

Hardy - Ramanujan Number (Magic Number) Program in Python

FLAMES CODE ON PYTHON

Count Swap for Sorting in Python