Write a python program to display the following pattern:
1
12
1 2 3
1 2 3 4
1 2 3 4 5
Total=5
Answers
Answered by
2
def pattern(n):
for i in range(0, n):
num =1
for j in range(0 , i+1):
print (num, end = " ")
num = num + 1
print ("\r")
pattern(5)
Similar questions