Skip to content

Commit

Permalink
fixed some formulae and functions for week3 git homework
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1pkav committed Oct 4, 2023
1 parent d2938f6 commit c93bde2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions homework/github_week3/fibonacci.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ def fibonacci_list(n: int) -> typing.List[int]:

def fibonacci_single(n: int) -> int:
"""Returns the nth Fibonacci number"""
return round((power(golden_section_num(), n) - power(-golden_section_reciprocal(), n)) / sqrt(5))


def golden_section_num() -> float:
"""Returns the golden section number"""
pass


def golden_ratio(n: int) -> float:
"""Returns the golden ratio, used in calculations"""
def golden_section_reciprocal() -> float:
"""Returns the reciprocal of the golden section number"""
pass


Expand Down

0 comments on commit c93bde2

Please sign in to comment.