diff --git a/exercises/fibonacci/solution.py b/exercises/fibonacci/solution.py index 9847dd5..a6825e8 100644 --- a/exercises/fibonacci/solution.py +++ b/exercises/fibonacci/solution.py @@ -1,4 +1,4 @@ -SUBMIT = False +SUBMIT = True def fibonacci(n: int) -> int: @@ -14,4 +14,11 @@ def fibonacci(n: int) -> int: >>> fibonacci(10) 55 """ - pass + if n == 0: + return 0 + if n == 1: + return 1 + a, b = 0, 1 + for _ in range(2, n + 1): + a, b = b, a + b + return b diff --git a/exercises/hello_world/solution.py b/exercises/hello_world/solution.py index 234e4d9..538fa03 100644 --- a/exercises/hello_world/solution.py +++ b/exercises/hello_world/solution.py @@ -1,4 +1,4 @@ -SUBMIT = False +SUBMIT = True def hello_world() -> str: @@ -8,7 +8,7 @@ def hello_world() -> str: >>> hello_world() 'Hello, World!' """ - pass + return "Hello, World!" # Workflow test internal