Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. class Fibonacci:
  2. def __init__(self):
  3. # Golden Ratio
  4. self.PHI = (1 + pow(5, 0.5)) / 2
  5.  
  6. def next_fibonacci(self, fib_arr):
  7. return map(lambda current_fib : round(current_fib * self.PHI), fib_arr)
  8.  
  9. def main():
  10. fib_arr = [34, 610, 46368]
  11.  
  12. fib = Fibonacci()
  13. print(list(fib.next_fibonacci(fib_arr)))
  14.  
  15. if __name__ == '__main__':
  16. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement