Untitled

mail@pastecode.io avatar
unknown
python
7 months ago
147 B
3
Indexable
Never
def print_pyramid(n):
    for i in range(n):
        print(' ' * (n - i - 1) + '*' * (2 * i + 1))

print_pyramid(int(input("Enter a number:")))
Leave a Comment