zjfz-2019-s402281/intro/Task105.py

18 lines
362 B
Python
Raw Normal View History

2020-01-12 13:11:00 +01:00
# -*- coding: utf-8 -*-
"""Rozwiązanie zadania 105."""
def is_almost_prime(number, limit):
"""Checks if number can not be divided with limit offset"""
if number < 0:
return False
for i in range(2, limit + 1):
if number%i == 0:
return False
return True
if __name__ == '__main__':
print is_almost_prime(5, 10)