add task 105

This commit is contained in:
Grzegorz Rogozik 2020-01-12 13:59:58 +01:00
parent 0eb7cdcb14
commit 5b7228361e

View File

@ -3,12 +3,11 @@
"""Rozwiązanie zadania 105.""" """Rozwiązanie zadania 105."""
def change_first(tuple_t, element_e): def is_almost_prime(number, limit):
"""Docstring for Pylint points""" if number < 0:
if not tuple_t: return False
return () else:
for i in range(2, limit + 1):
tuple_list = list(tuple_t) if number % i == 0:
tuple_list[0] = element_e return False
new_tuple = tuple(tuple_list) return True
return new_tuple