input: 
  def fibonacci(n):
      """ Generate and print Fibonacci series up to a given number.
      >>> fibonacci(10)
      0
      1
      1
      2
      3
      5
      8
      >>> fibonacci(-5)
      Incorrect input
      """
      a = 0
      b = 1
      if n < 0:
          print("Incorrect input")
      elif n == 0:
          return a
      elif n == 1:
          return b
      else:
          print(a)
          print(b)
          for i in range(2, n):
              c = a + b
              a = b
              b = c
              print(c)
  
  n = int(input("Enter a number: "))
  fibonacci(n)
  
output:     a = 0
      b = 1
      if n < 0:
          print("Incorrect input")
      elif n == 0:
          return a
      elif n == 1:
          return b
      else:
          print(a)
          print(b)
          for i in range(2, n):
              c = a + b
              a = b
              b = c
              print(c)