SHARE
TWEET

Untitled

a guest Aug 13th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import math
  2.  
  3. def div(n):
  4.     divisores = []
  5.    
  6.     for i in range(1,n+1):
  7.         if n % i == 0:
  8.             divisores.append(i)
  9.     return divisores
  10.  
  11. def isprime(n):
  12.     d = div(n)
  13.     if len(d) == 2:
  14.         return True
  15.     else:
  16.         return False
  17.  
  18. for i in range(0,200):
  19.     if isprime(i):
  20.         print(i)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top