Advertisement
biswasrohit20

pri

Mar 28th, 2021
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. numbers = list(range(30))
  2. primes = []
  3.  
  4. for n in numbers:
  5. if n >2:
  6. check = True
  7. for j in range(2,n):
  8. if n%j == 0:
  9. check = False
  10. if check:
  11. primes.append(n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement