Last active
March 28, 2023 12:57
-
-
Save FernandoCelmer/c3d64cccabe211ba87f0472df4242bd5 to your computer and use it in GitHub Desktop.
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
def pyramid(scale: int): | |
node = [] | |
for index in range(1, scale + 1): | |
node.append((index*2-scale)*"*") if (index*2-scale) > 0 else None | |
for item in node: | |
print(item.center(scale)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment