Computer Science, asked by shahnashahnawaz15, 7 months ago

do a python program for
5
4 4
3 3 3
2 2 2 2
1 1 1 1 1 1

Answers

Answered by anindyaadhikari13
1

Question:-

Write a Python program to display the following pattern.

5

4 4

3 3 3

2 2 2 2

1 1 1 1 1

Program:-

n=int(input("Enter the number of rows: "))

for i in range(n, 0,-1):

for j in range(n, i-1, -1):

print(i,end=" ")

print()

Similar questions