Created
February 28, 2020 20:52
-
-
Save r3ne-pew/befddfca88e1d3e795a15fac8e890a31 to your computer and use it in GitHub Desktop.
generate pyramid print in python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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