def triangle(n):
    """
    This function forms a triangle that  will help act as tree lives
    :param n: n is an integer for rows to be used
    :return: it returns no space ie ""
    """
    for i in range(n):
        # for catering the decreasing space as the triangle is formed
        for j in range(n-i):
            print(' ', end=' ')
        # catering for stars formation as the increase as space decreases
        for k in range(2*i + 1):
            print("*", end=" ")
        print()
    return ""