input: Write a python function to print a right-angled triangle star pattern.  
  assert starPattern(3) == "* \r\n* * \r\n* * * \r\n"  
  assert starPattern(5) == "* \r\n* * \r\n* * * \r\n* * * * \r\n* * * * * \r\n"  
  assert starPattern(1) == "* \r\n"
output: def starPattern(n):
      pattern = ""
      for i in range(1, n + 1):
          pattern += "* " * i + "\r\n"
      return pattern