From the question I understood, this is the code. Comment under the solution if there is something to be edited, but this should definitely work.
def draw_triangle(n):
if n == 1:
print('*'.center(19))
else:
draw_triangle(n-2)
print((n*'*').center(19))
draw_triangle(19)