Hi I was thinking this kind of code is short and easy to write is there any ways to do this in Julia? thanks
#Python code of Trinomial triangle
row = [1]
for i in range(8):
print(row)
row = [sum(t) for t in zip([0,0]+row, [0]+row+[0], row+[0,0])]
#output
[1]
[1, 1, 1]
[1, 2, 3, 2, 1]
[1, 3, 6, 7, 6, 3, 1]
[1, 4, 10, 16, 19, 16, 10, 4, 1]
[1, 5, 15, 30, 45, 51, 45, 30, 15, 5, 1]
[1, 6, 21, 50, 90, 126, 141, 126, 90, 50, 21, 6, 1]
[1, 7, 28, 77, 161, 266, 357, 393, 357, 266, 161, 77, 28, 7, 1]
Thanks you