I'm working on a homework assignment that asks me to create a Pascal Triangle using a recursive function. Below is what I've managed so far along with what I was given to work with. I'm quite new to Python and programming so I've got no idea where to head from here, any help would be appreciated!
def combination(n, k):
print((n - 1) / (k - 1)) + ((n - 1) / k)
def pascals_triangle(rows):
for row in range(rows):
answer = ""
for column in range(row + 1):
answer = answer + combination(row, column) + "\t"
print(answer)
pascals_triangle(5)
combination(row, column)to return a string, but it just prints to the terminal and then returnsNonerange(n)iterates from0ton-1.