add task 105
This commit is contained in:
parent
0eb7cdcb14
commit
5b7228361e
@ -3,12 +3,11 @@
|
||||
|
||||
"""Rozwiązanie zadania 105."""
|
||||
|
||||
def change_first(tuple_t, element_e):
|
||||
"""Docstring for Pylint points"""
|
||||
if not tuple_t:
|
||||
return ()
|
||||
|
||||
tuple_list = list(tuple_t)
|
||||
tuple_list[0] = element_e
|
||||
new_tuple = tuple(tuple_list)
|
||||
return new_tuple
|
||||
def is_almost_prime(number, limit):
|
||||
if number < 0:
|
||||
return False
|
||||
else:
|
||||
for i in range(2, limit + 1):
|
||||
if number % i == 0:
|
||||
return False
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user