__author__ = 'Polo-Dev'
def is_prime(num):
check = True
if num > 1:
if num > 2:
for i in range(2, int(num/2)+2):
if num % i == 0:
check = False
break
else:
check = False
return check
number = 100
for i in range(1, number+1):
if is_prime(i):
print(i)
def is_prime(num):
check = True
if num > 1:
if num > 2:
for i in range(2, int(num/2)+2):
if num % i == 0:
check = False
break
else:
check = False
return check
number = 100
for i in range(1, number+1):
if is_prime(i):
print(i)
No comments:
Post a Comment