diff --git a/Pipfile b/Pipfile index 6cc9673..0fdfb25 100644 --- a/Pipfile +++ b/Pipfile @@ -16,4 +16,4 @@ black = "*" flake8 = "*" [requires] -python_version = "3.12" +python_version = "3" diff --git a/manipulations/library.py b/manipulations/library.py index 8f2a8ff..4c81928 100644 --- a/manipulations/library.py +++ b/manipulations/library.py @@ -10,4 +10,16 @@ def fizz_buzz_access(items: list[T]) -> list[T]: - is divisible by 3 or 5 - not divisible by 3 and 5 """ - return items + correct_items = [] + for x in range(len(items)): + append_me = False + if x%3 == 0: + append_me = True + if x%5 == 0: + append_me = True + if x%15 == 0: + append_me = False + if append_me: + correct_items.append(x + 1) + + return correct_items