Python 3 Script to Print Inverted Pyramid of Numbers Pattern Using For Loop

Python 3 Script to Print Inverted Pyramid of Numbers Pattern Using For Loop

Python 3 Script to Print Inverted Pyramid of Numbers Pattern Using For Loop

rows = 5

b = 0

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

    b += 1

    for j in range(1, i + 1):

        print(b, end=’ ‘)

    print(‘r’)
Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment