Computer Science, asked by nagolunithin, 4 months ago

Write a Python program to construct the following pattern, using a ‘nested for loop’.
1
2 3 4
5 6 7 8 9

Answers

Answered by bhumikamanjunath1206
1

Answer:

rows = 6

for num in range(rows):

   for i in range(num):

       print(num, end=" ")  # print number

   # line after each row to display pattern correctly

   print(" ")

Answered by Anonymous
0

Answer:

v=1
for a in range(0,6,2):
for b in range(a+1):
 print(v, end=' ')
 v+=1
print('')

Explanation:

Similar questions