Skip to content

Instantly share code, notes, and snippets.

@amankharwal

amankharwal/Pyramid.py Secret

Created Apr 28, 2021
Embed
What would you like to do?
def pyramid_pattern(n):
a = 2 * n-2
for i in range(0, n):
for j in range(0, a):
print(end=" ")
a = a-1
for j in range(0, i+1):
print("*", end=" ")
print("\r")
print(pyramid_pattern(10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment