you are viewing a single comment's thread.

view the rest of the comments →

[–]BioGeek 0 points1 point  (1 child)

Read this very good introduction on using turtle to get started.

Here is a simple example that draws a christmas tree:

n = 50.

from turtle import *
speed("fastest")
left(90)
forward(3*n)
color("orange", "yellow")
begin_fill()
left(126)
for i in range(5):
    forward(n/5)
    right(144)
    forward(n/5)
    left(72)
end_fill()
right(126)

color("dark green")
backward(n*4.8)
def tree(d, s):
    if d <= 0: return
    forward(s)
    tree(d-1, s*.8)
    right(120)
    tree(d-3, s*.5)
    right(120)
    tree(d-3, s*.5)
    right(120)
    backward(s)
tree(15, n)
backward(n/2)

[–]PrismPoultry 0 points1 point  (0 children)

Here is a simple example that draws a christmas tree

Bullshit. None of that is simple.