8 lines
188 B
Python
8 lines
188 B
Python
def is_almost_prime(x, limit):
|
|
if x <0:
|
|
return False
|
|
else:
|
|
for y in range(2, limit+1):
|
|
if(x % y == 0):
|
|
return False
|
|
reutrn True |