Inverted pyramid pattern of numbers
An inverted pyramid is a downward pattern where numbers get reduced in each iteration, and on the last row, it shows only one number. Use reverse for loop to print this pattern.
1
Expert's answer
2021-09-24T18:58:12-0400
n = int(input())
for i in range(n,0,-1):
for j in range(n-i):
print(' ', end='')
for j in range(2*i-1):
print(i,end='')
print()
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment