zjfz-2019-s402281/intro/Task105.py

14 lines
237 B
Python
Raw Normal View History

2020-01-12 13:16:55 +01:00
#!/usr/bin/python2
2020-01-12 13:11:00 +01:00
# -*- coding: utf-8 -*-
"""Rozwiązanie zadania 105."""
2020-01-12 13:59:58 +01:00
def is_almost_prime(number, limit):
if number < 0:
2020-01-12 14:48:03 +01:00
return False
else:
for i in range(2, limit + 1):
if number % i == 0:
return False
return True