input: Write a python function to generate a right-angled triangle pattern with asterisks using nested loops.
  assert generate_triangle(1)=='*\n'
  assert generate_triangle(3)=='*\n**\n***\n'
  assert generate_triangle(5)=='*\n**\n***\n****\n*****\n'
output: def generate_triangle(n):
      triangle = ""
      for i in range(1, n + 1):
          triangle += '*' * i + '\n'
      return triangle