From 9e13a57cb20e7c088322dd37cfd0a54e3ce2704b Mon Sep 17 00:00:00 2001 From: Dominic Duffin Date: Sat, 26 Aug 2023 14:43:44 +0100 Subject: [PATCH] Add sample christmas tree --- drawfunctions/dominic_duffin.py | 46 +++++++++++++++++++++++++++++++++ main.py | 3 +++ 2 files changed, 49 insertions(+) create mode 100644 drawfunctions/dominic_duffin.py diff --git a/drawfunctions/dominic_duffin.py b/drawfunctions/dominic_duffin.py new file mode 100644 index 0000000..317441c --- /dev/null +++ b/drawfunctions/dominic_duffin.py @@ -0,0 +1,46 @@ +from turtle import Turtle +from turtle import Screen + +def christmas_tree(): + + turtle = Turtle() + screen = Screen() + screen.colormode(255) + + turtle.hideturtle() + turtle.penup() + turtle.setposition((20, 20)) + turtle.begin_fill() + turtle.pendown() + turtle.color((15, 140, 15), (15, 225, 15)) + turtle.forward(25) + turtle.left(150) + turtle.forward(20) + turtle.right(150) + turtle.forward(15) + turtle.left(150) + turtle.forward(20) + turtle.right(150) + turtle.forward(10) + turtle.left(150) + turtle.forward(20) + turtle.left(60) + turtle.forward(20) + turtle.left(150) + turtle.forward(10) + turtle.right(150) + turtle.forward(20) + turtle.left(150) + turtle.forward(15) + turtle.right(150) + turtle.forward(20) + turtle.left(150) + turtle.forward(25) + turtle.right(90) + turtle.forward(15) + turtle.left(90) + turtle.forward(4) + turtle.left(90) + turtle.forward(15) + turtle.penup() + turtle.end_fill() \ No newline at end of file diff --git a/main.py b/main.py index c08866e..1f0baeb 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,6 @@ from turtle import exitonclick +from drawfunctions import dominic_duffin + +dominic_duffin.christmas_tree() exitonclick() \ No newline at end of file