def make_triangle(n, ch): """precondition n > 0 is a integer ch is a one-character string postcondition: returns a string that will print a triangle of copies of ch with one copy in the first row, two in the second, etc """ if n == 0: return "" new_row = ch*n + "\n" return make_triangle(n - 1, ch) + new_row def puzzler(n, ch): """precondition n > 0 is a integer ch is a one-character string postcondition: returns a string that will print a triangle of copies of ch with one copy in the first row, two in the second, etc """ if n == 0: return "" new_row = ch*n + "\n" return new_row + puzzler(n - 1, ch) print(make_triangle(2, "$")) print(puzzler(20, "$"))