Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_prime(x):
- prime = True
- test = 2
- while prime != False and test != x:
- if x % test == 0:
- prime = False
- else:
- test += 1
- return prime
- def print_prime():
- for x in range (2, 1000):
- if is_prime(x) == True:
- print(x)
- print_prime()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement