input: Write a function to print the following pattern: print a right triangle of asterisks (*) with its base and height equal to 5, followed by an inverted right triangle of asterisks with its base and height equal to 5.
  
  
  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("")
  
  
  assert print_pattern() # No assertion error as the function prints the pattern directly.
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("")