Skip to content

Commit

Permalink
Add sample christmas tree
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicduffin1 committed Aug 26, 2023
1 parent 8a145d4 commit 9e13a57
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
46 changes: 46 additions & 0 deletions drawfunctions/dominic_duffin.py
Original file line number Diff line number Diff line change
@@ -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()
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from turtle import exitonclick
from drawfunctions import dominic_duffin

dominic_duffin.christmas_tree()

exitonclick()

0 comments on commit 9e13a57

Please sign in to comment.