RosettaCodeData/Task/Sierpinski-triangle-Graphical/Python/sierpinski-triangle-graphic...

10 lines
199 B
Python

# likely the simplest possible version?
import turtle as t
def sier(n,length):
if (n==0):
return
for i in range(3):
sier(n-1, length/2)
t.fd(length)
t.rt(120)