def Fibonacci(n):
          if n < 2:
              return n
          fs = [0, 1]
          for i in range(1, n):
              fs.append(fs[i] + fs[i - 1])
          return fs[n]
      n = 6
      print(Fibonacci(n))
      

      Python language logoFind the Nth Term of a Fibonacci Series

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.