add task 105
This commit is contained in:
parent
0eb7cdcb14
commit
5b7228361e
@ -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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user