input: Write a function to print the following pattern: an increasing number of stars in each line from 1 to 5, followed by a decreasing number of stars from 5 to 1. The function should take an integer parameter `n` that determines the number of rows in each part of the pattern. If `n` is provided, the pattern should include `n` rows in the ascending section and `n` rows in the descending section. If `n` is not provided, default it to 5.
  
  
  def print_pattern(n=5):
      for i in range(1, n+1):
          for j in range(i):
              print("*", end="")
          print("")
      for i in range(n, 0, -1):
          for j in range(i):
              print("*", end="")
          print("")
  
  assert print_pattern()  # Output should be the pattern with 5 rows ascending and 5 rows descending
  assert print_pattern(3)  # Output should be the pattern with 3 rows ascending and 3 rows descending
  assert print_pattern(7)  # Output should be the pattern with 7 rows ascending and 7 rows descending
  
output: def print_pattern(n=5):
      for i in range(1, n+1):
          for j in range(i):
              print("*", end="")
          print("")
      for i in range(n, 0, -1):
          for j in range(i):
              print("*", end="")
          print("")