Skip to content

Instantly share code, notes, and snippets.

@r3ne-pew
Created February 28, 2020 20:52
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 r3ne-pew/befddfca88e1d3e795a15fac8e890a31 to your computer and use it in GitHub Desktop.
Save r3ne-pew/befddfca88e1d3e795a15fac8e890a31 to your computer and use it in GitHub Desktop.
generate pyramid print in python
reihen = 5
reihen = int (reihen)
for i in range (0, reihen):
for j in range(0, i + 1):
print("x", end=' ')
print("\r")
for i in range (reihen, 0, -1):
for j in range(0, i -1):
print("x", end=' ')
print("\r")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment