Skip to content

Instantly share code, notes, and snippets.

@brentxphillips
Last active March 10, 2022 01:50
Show Gist options
  • Save brentxphillips/dcc6b2d642ccba79ba117cc982ae0f81 to your computer and use it in GitHub Desktop.
Save brentxphillips/dcc6b2d642ccba79ba117cc982ae0f81 to your computer and use it in GitHub Desktop.
While recursive loop version
# 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