input: Write a python function to print a pyramid pattern of stars.
  assert print_pyramid(3) == "*
  **
  ***
  "
  assert print_pyramid(4) == "*
  **
  ***
  ****
  "
  assert print_pyramid(5) == "*
  **
  ***
  ****
  *****
  "
output: def print_pyramid(n):
      result = ""
      for i in range(1, n+1):
          result += "*" * i + "\n"
      return result