input: Write a function to print the following pattern: a triangle of asterisks (*) where the number of rows increases from 1 to 5 and then decreases back to 1.
  for i in range(5):
      for j in range(i+1):
          print("*", end="")
      print("")
  
  for i in range(5, 0, -1):
      for j in range(i):
          print("*", end="")
      print("")
  assert print_pattern()=="""
  *
  **
  ***
  ****
  *****
  ****
  ***
  **
  *
  """
  assert print_pattern()==None
output: def print_pattern():
      for i in range(5):
          for j in range(i+1):
              print("*", end="")
          print("")
  
      for i in range(5, 0, -1):
          for j in range(i):
              print("*", end="")
          print("")