8000 Hacktoberfest 2020 - Style Improvements for project_euler/problem_26 by nstoik · Pull Request #2958 · TheAlgorithms/Python · GitHub
[go: up one dir, main page]

Skip to content

Hacktoberfest 2020 - Style Improvements for project_euler/problem_26 #2958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 8, 2020
Prev Previous commit
Next Next commit
update sol1 after running black
  • Loading branch information
nstoik committed Oct 6, 2020
commit f8feca3836b7347e9f7a1b734aa8c7a0ff4eb3be
18 changes: 9 additions & 9 deletions project_euler/problem_25/sol1.py
628B
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ def fibonacci(n: int) -> int:
and creating an array of ints using the Fibonacci formula.
Returns the nth element of the array.

>>> fibonacci(2)
>>> fibonacci(2)
1
>>> fibonacci(3)
>>> fibonacci(3)
2
>>> fibonacci(5)
>>> fibonacci(5)
5
>>> fibonacci(10)
>>> fibonacci(10)
55
>>> fibonacci(12)
>>> fibonacci(12)
144

"""
Expand All @@ -60,14 +60,14 @@ def fibonacci_digits_index(n: int) -> int:
Computes incrementing Fibonacci numbers starting from 3 until the length
of the resulting Fibonacci result is the input value n. Returns the term
of the Fibonacci sequence where this occurs.

>>> fibonacci_digits_index(1000)
4782
>>> fibonacci_digits_index(100)
>>> fibonacci_digits_index(100)
476
>>> fibonacci_digits_index(50)
>>> fibonacci_digits_index(50)
237
>>> fibonacci_digits_index(3)
>>> fibonacci_digits_index(3)
12
"""
digits = 0
Expand Down
0