Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created April 28, 2021 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/41ce855923366289e5931a1b4ddf679a to your computer and use it in GitHub Desktop.
Save amankharwal/41ce855923366289e5931a1b4ddf679a to your computer and use it in GitHub Desktop.
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