RosettaCodeData/Task/Sierpinski-triangle-Graphical/Python/sierpinski-triangle-graphical-1.py
2018-06-22 20:57:24 +00:00

9 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)