Загрузил(а) файлы в 'tested_code'

This commit is contained in:
Inex Code 2022-01-10 20:03:22 +03:00
parent 67694ba7ef
commit 485a1adcc1

13
tested_code/__init__.py Normal file
View 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