Загрузил(а) файлы в 'tested_code'
This commit is contained in:
parent
67694ba7ef
commit
485a1adcc1
13
tested_code/__init__.py
Normal file
13
tested_code/__init__.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
def fibonacci(n):
|
||||
if n in (1, 2):
|
||||
return 1
|
||||
return fibonacci(n-1) + fibonacci(n-2)
|
||||
|
||||
def is_palindrome(str):
|
||||
str = str.replace(" ", "")
|
||||
str = str.lower()
|
||||
reversed_str = ''.join(reversed(str))
|
||||
if str == reversed_str:
|
||||
return True
|
||||
else:
|
||||
return False
|
Loading…
Reference in a new issue