input: Write a function to print a star pattern in Python. The pattern should start with one star in the first row and increase by one star per row until it reaches five stars, and then decrease by one star per row until it returns to one star. If the input is invalid then print an error message.
  
  def print_star_pattern(n):
      if n <= 0:
          print("Invalid input")
          return
      for i in range(n):
          for j in range(i+1):
              print("*", end="")
          print("")
      for i in range(n, 0, -1):
          for j in range(i):
              print("*", end="")
          print("")
  
  assert print_star_pattern(5)==None
  assert print_star_pattern(3)==None
  assert print_star_pattern(0)=="Invalid input"
  assert print_star_pattern(-1)=="Invalid input"
output: def print_star_pattern(n):
      if n <= 0:
          print("Invalid input")
          return
      for i in range(n):
          for j in range(i+1):
              print("*", end="")
          print("")
      for i in range(n-1, 0, -1):
          for j in range(i):
              print("*", end="")
          print("")