From 8c493f1497cf3f88f72feb12a5ff4b04757428c0 Mon Sep 17 00:00:00 2001 From: Christina Loiacono <65386414+christina-ml@users.noreply.github.com> Date: Wed, 16 Oct 2024 05:08:08 -0400 Subject: [PATCH] Christina adding tree present function to main.py (#13) * add tree present function to main.py * Add tree present function to main.py Add .DS_Store to .gitignore * remove .DS_Store --- .gitignore | 3 +- drawfunctions/christina_loiacono.py | 98 +++++++++++++++++++++++++++++ main.py | 3 +- 3 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 drawfunctions/christina_loiacono.py diff --git a/.gitignore b/.gitignore index 94d01d6..7412f6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ __pycache__ -.vscode/ \ No newline at end of file +.vscode/ +.DS_Store \ No newline at end of file diff --git a/drawfunctions/christina_loiacono.py b/drawfunctions/christina_loiacono.py new file mode 100644 index 0000000..29d50f4 --- /dev/null +++ b/drawfunctions/christina_loiacono.py @@ -0,0 +1,98 @@ +from turtle import Turtle +from turtle import Screen + +def tree_present(): + + turtle = Turtle() + screen = Screen() + screen.colormode(255) + + turtle.hideturtle() + turtle.penup() + turtle.setposition((10, -5)) + turtle.right(90) + + # front of box + turtle.pendown() + turtle.begin_fill() + turtle.color((219,112,147), (219,112,147)) + turtle.forward(20) + turtle.right(90) + turtle.forward(20) + turtle.right(90) + turtle.forward(20) + turtle.right(90) + turtle.forward(20) + turtle.penup() + turtle.end_fill() + + # move turtle to center of box for horizontal ribbon + turtle.color((75,0,130), (138,43,226)) + turtle.right(90) + turtle.forward(8) + + # horizontal ribbon + turtle.pendown() + turtle.begin_fill() + turtle.forward(4) + turtle.right(90) + turtle.forward(20) + turtle.right(90) + turtle.forward(4) + turtle.right(90) + turtle.forward(20) + turtle.penup() + turtle.end_fill() + + # move turtle to top right corner of box + turtle.left(90) + turtle.forward(8) + + # vertical ribbon + turtle.color((75,0,130), (138,43,226)) + turtle.left(90) + turtle.forward(8) + + turtle.pendown() + turtle.begin_fill() + turtle.left(90) + turtle.forward(20) + turtle.right(90) + turtle.forward(4) + turtle.right(90) + turtle.forward(20) + turtle.right(90) + turtle.forward(4) + turtle.penup() + turtle.end_fill() + + # bow + # right side of bow + turtle.color((75,0,130), (138,43,226)) + turtle.begin_fill() + turtle.left(25) + + turtle.pendown() + turtle.forward(8) + turtle.left(105) + turtle.forward(8) + turtle.left(120) + turtle.forward(10) + turtle.penup() + turtle.end_fill() + + # left side of bow + turtle.color((0,0,0), (138,43,226)) + turtle.begin_fill() + turtle.right(60) + turtle.forward(2) + + turtle.pendown() + turtle.right(25) + turtle.forward(10) + turtle.right(120) + turtle.forward(8) + turtle.right(105) + turtle.forward(8) + turtle.penup() + turtle.end_fill() diff --git a/main.py b/main.py index fa26e1c..3b6cc2e 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 +from drawfunctions import dominic_duffin, david_akim, satoshi_s, teri_eyenike, david_akim_present_2024, david_akim_christmas_sock, chris_j, christina_loiacono dominic_duffin.christmas_tree() david_akim.star() @@ -8,5 +8,6 @@ david_akim_present_2024.draw_present() david_akim_christmas_sock.draw_christmas_sock() chris_j.draw_snowman() +christina_loiacono.tree_present() exitonclick()