input: Write a function in Python to print the Fibonacci series up to the nth term.
  
  def printFibonacciSeries(n): 
    
      # Taking 1st two fibonacci nubers as 0 and 1 
      f1 = 0
      f2 = 1
      if n <= 0:
          print("Please enter a positive integer")
      elif n == 1:
          print(f1)
      else:
          print(f1, f2, end = " ") 
          for i in range(2, n): 
              next = f1 + f2 
              print(next, end = " ") 
              f1 = f2 
              f2 = next
  
  assert printFibonacciSeries(5) == "0 1 1 2 3"
  assert printFibonacciSeries(1) == "0"
  assert printFibonacciSeries(0) == "Please enter a positive integer"
  assert printFibonacciSeries(-1) == "Please enter a positive integer"
  assert printFibonacciSeries(10) == "0 1 1 2 3 5 8 13 21 34"
output: def printFibonacciSeries(n): 
      f1 = 0
      f2 = 1
      if n <= 0:
          print("Please enter a positive integer")
      elif n == 1:
          print(f1)
      else:
          print(f1, f2, end = " ") 
          for i in range(2, n): 
              next = f1 + f2 
              print(next, end = " ") 
              f1 = f2 
              f2 = next