input: Write a function to print the Fibonacci series up to a given number.
  def fibonacci(n): 
      a = 0
      b = 1
      series = []
      if n < 0: 
          print("Incorrect input") 
      else: 
          while a <= n:
              series.append(a)
              c = a + b 
              a = b 
              b = c 
      print(series)
      
  n = int(input("Enter a number: "))
  fibonacci(n)
  
  assert fibonacci(5) == [0, 1, 1, 2, 3, 5]
  assert fibonacci(10) == [0, 1, 1, 2, 3, 5, 8]
  assert fibonacci(0) == [0]
  assert fibonacci(-1) == "Incorrect input"
  assert fibonacci(1) == [0, 1, 1]
output: def fibonacci(n): 
      a = 0
      b = 1
      series = []
      if n < 0: 
          print("Incorrect input") 
      else: 
          while a <= n:
              series.append(a)
              c = a + b 
              a = b 
              b = c 
      print(series)