I'd like to draw a series of nested triangles using recursion.
My faulty code below:
def recursiveTri(x, y, shrink):
tt.penup()
tt.setx(x)
tt.sety(y)
if x > -10:
return
for element in range(3):
tt.pendown()
tt.forward(x)
tt.right(120)
recursiveTri(x + shrink, y - shrink, shrink)
def main():
recursiveTri(-300,300,30)
main()
The current code produces the following:

Here is what I mean by nested shapes, except that I would like to draw triangles instead of squares:



import turtle as tt. It's heavily implied, and the code is pretty unambiguous