9 lines
221 B
Python
9 lines
221 B
Python
def is_almost_prime(number: int, limit: int) -> bool:
|
|
if number < 0:
|
|
return False
|
|
else:
|
|
for i in range(2, limit+1):
|
|
if number % i == 0:
|
|
return False
|
|
return True
|