Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def div(n):
- divisores = []
- for i in range(1,n+1):
- if n % i == 0:
- divisores.append(i)
- return divisores
- def isprime(n):
- d = div(n)
- if len(d) == 2:
- return True
- else:
- return False
- for i in range(0,200):
- if isprime(i):
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement