8 lines
189 B
Python
8 lines
189 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
|
|
return True |