I have coded a Pascal's Triangle program in Python but the triangle is printing as a right angled triangle
n=int(input("Enter the no. of rows: "))
for line in range(1, n + 1):
c = 1
x=n
y=line
for i in range(1, line + 1):
print(c, end = " ")
c = int(c * (line - i) / i)
print(" ")
This gives the output as
Enter the no. of rows: 5
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
But I want it like this