User Tools

Site Tools


computer_science:python_prime

Find Prime number with Python

occurence=0 for num in range(2,1000):

  if all(num%i!=0 for i in range(2,num)):
      occurence=occurence+1
      

print (occurence)

computer_science/python_prime.txt ยท Last modified: by cosmo

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki