diff --git a/drawfunctions/david_akim_candycane.py b/drawfunctions/david_akim_candycane.py new file mode 100644 index 0000000..39f33a9 --- /dev/null +++ b/drawfunctions/david_akim_candycane.py @@ -0,0 +1,98 @@ +from turtle import Turtle + + +def draw_candycane(): + turtle = Turtle() + # turtle.speed(3) + turtle.hideturtle() + + # candy cane + turtle.up() + turtle.goto(100, 90) + turtle.down() + turtle.rt(-90) + turtle.circle(15, 180) + turtle.fd(50) + turtle.circle(5, 180) + turtle.fd(50) + turtle.circle(-5, 180) + turtle.circle(5, 180) + turtle.up() + + # red stripe + turtle.goto(70, 70) + turtle.down() + turtle.begin_fill() + turtle.color('red') + turtle.fd(5) + turtle.rt(45) + turtle.fd(14) + turtle.rt(135) + turtle.fd(5) + turtle.rt(45) + turtle.fd(14) + turtle.end_fill() + + # green stripe + turtle.up() + turtle.goto(70, 55) + turtle.down() + turtle.rt(135) + turtle.begin_fill() + turtle.color('green') + turtle.fd(5) + turtle.rt(45) + turtle.fd(14) + turtle.rt(135) + turtle.fd(5) + turtle.rt(45) + turtle.fd(14) + turtle.end_fill() + + # red stripe + turtle.up() + turtle.goto(70, 40) + turtle.down() + turtle.rt(135) + turtle.begin_fill() + turtle.color('red') + turtle.fd(5) + turtle.rt(45) + turtle.fd(14) + turtle.rt(135) + turtle.fd(5) + turtle.rt(45) + turtle.fd(14) + turtle.end_fill() + + # red stripe + turtle.up() + turtle.goto(90, 90) + turtle.down() + turtle.rt(135) + turtle.begin_fill() + turtle.color('red') + turtle.fd(5) + turtle.rt(45) + turtle.fd(9) + turtle.rt(135) + turtle.fd(5) + turtle.rt(45) + turtle.fd(9) + turtle.end_fill() + + # green stripe + turtle.up() + turtle.goto(70, 83) + turtle.down() + turtle.rt(135) + turtle.begin_fill() + turtle.color('green') + turtle.fd(5) + turtle.rt(45) + turtle.fd(22) + turtle.rt(50) + turtle.fd(5) + # turtle.rt(130) + # turtle.fd(22) + turtle.end_fill() diff --git a/main.py b/main.py index 3b6cc2e..ea4aff8 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,5 @@ from turtle import exitonclick -from drawfunctions import dominic_duffin, david_akim, satoshi_s, teri_eyenike, david_akim_present_2024, david_akim_christmas_sock, chris_j, christina_loiacono +from drawfunctions import dominic_duffin, david_akim, satoshi_s, teri_eyenike, david_akim_present_2024, david_akim_christmas_sock, chris_j, christina_loiacono, david_akim_candycane dominic_duffin.christmas_tree() david_akim.star() @@ -9,5 +9,6 @@ david_akim_christmas_sock.draw_christmas_sock() chris_j.draw_snowman() christina_loiacono.tree_present() +david_akim_candycane.draw_candycane() exitonclick()