Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created April 28, 2021 09:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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