input: Write a function to generate and print a pattern of asterisks in an increasing and then decreasing sequence. The function should take an integer n as input and print n rows of increasing asterisks followed by n rows of decreasing asterisks.
  assert print_pattern(3)
  assert print_pattern(4)
  assert print_pattern(5)
output: def print_pattern(n):
      for i in range(1, n + 1):
          print('*' * i)
      for i in range(n - 1, 0, -1):
          print('*' * i)