pascal triangle number in python
def factorial(n): k = 1 for i in range(1,n+1): k *= i return k output = "" n = 10 print("Bilangan pascal",n,"baris") for i in range(0,n): output = "" for j in range(i): output += str(int(factorial(i) / (factorial(j) * factorial(i-j)))) + " " output += "1" print(output)