input: Write a function to generate a Python program that displays a Fibonacci sequence of the first n numbers. The function should return the nth Fibonacci number. Additionally, print the Fibonacci sequence up to the nth number.
  
  def Fibonacci(n):
      if n==1:
          return 0
      elif n==2:
          return 1
      else:
          return Fibonacci(n-1)+Fibonacci(n-2)
  
  n = 10
  for i in range(1, n):
      print(Fibonacci(i))
  
  assert Fibonacci(1) == 0
  assert Fibonacci(2) == 1
  assert Fibonacci(10) == 34
  assert Fibonacci(15) == 377
output: def Fibonacci(n):
      if n == 1:
          print(0)
          return 0
      elif n == 2:
          print(0)
          print(1)
          return 1
      else:
          a, b = 0, 1
          print(a)
          print(b)
          for i in range(2, n):
              c = a + b
              print(c)
              a, b = b, c
          return b