Pyramid Pattern in Python

SOLUTION....

n = 5
for i in range(1, n + 1):
    print(" " * (n - i) + "*" * (2 * i - 1))

OUTPUT

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.