Uno2K

Aula6 - calcula_fibonacci

Sep 16th, 2021
1,001
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def calcula_fibonacci(n):
  2.     fibonacci = [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584]
  3.     newFibonacci = []
  4.     for i in range(n):
  5.         new = fibonacci[i]
  6.         newFibonacci.append(new)
  7.         print(newFibonacci)
  8.     return newFibonacci
  9.  
  10. print(calcula_fibonacci(10))
RAW Paste Data