We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4926055 commit b6570eaCopy full SHA for b6570ea
maths/fibonacci.py
@@ -43,11 +43,13 @@ def fib_memo(n):
43
return fib_memo(n)
44
45
else:
46
- raise ValueError("Invalid method. Choose 'iterative', 'recursive', or 'memoized'.")
+ raise ValueError(
47
+ "Invalid method. Choose 'iterative', 'recursive', or 'memoized'."
48
+ )
49
50
51
# Example Usage:
52
if __name__ == "__main__":
- print(fibonacci(10)) # Default (iterative)
- print(fibonacci(10, "recursive")) # Recursive method
53
- print(fibonacci(10, "memoized")) # Memoized method
+ print(fibonacci(10)) # Default (iterative)
54
+ print(fibonacci(10, "recursive")) # Recursive method
55
+ print(fibonacci(10, "memoized")) # Memoized method
0 commit comments