input: Write a function to generate a pattern of stars where the pattern starts with a single star at the top, increases to five stars, and then decreases back to a single star. The function should take an integer n as input, where n is the maximum number of stars in the middle row of the pattern. If the input is less than 1, the function should print nothing.
  assert print_pattern(5)==None
  assert print_pattern(1)==None
  assert print_pattern(-1)==None
output: def print_pattern(n):
      if n < 1:
          return
      for i in range(1, n + 1):
          print('*' * i)
      for i in range(n - 1, 0, -1):
          print('*' * i)