Last active
March 10, 2022 01:50
-
-
Save brentxphillips/dcc6b2d642ccba79ba117cc982ae0f81 to your computer and use it in GitHub Desktop.
While recursive loop version
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
# triangle.py | |
# Recurion loop practice starting with a while loop example | |
triangle = ["one"] | |
def pyramid(): | |
while len(triangle) < 6: | |
line_len = len(triangle) | |
print(triangle) | |
triangle.append("one") | |
pyramid() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment