input: Write a function to generate a pattern of stars that starts with increasing the number of stars in each row until it reaches a peak, then decreases the number of stars back to one. The peak number of stars should be equal to the input value n.
  
  def star_pattern(n):
      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 star_pattern(5)  # This should print the pattern described in the Output section
  assert star_pattern(3)  # This should print a smaller version of the pattern with a peak of 3 stars
  assert star_pattern(1)  # This should print a very simple pattern with just one star
output: def star_pattern(n):
      for i in range(n):
          print("*" * (i + 1))
      for i in range(n - 1, 0, -1):
          print("*" * i)