Guest User

Untitled

a guest
May 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. def check_prime(nums):
  2. if num <2:
  3. return 0
  4. myprimelist = [2]
  5. j = 3
  6. while j <=num:
  7. for i in range(j,3,2):
  8. if j % i ==0:
  9. j += 2
  10. break
  11. else:
  12. myprimelist.append(j)
  13. j +=2
  14. print(myprimelist)
Add Comment
Please, Sign In to add comment