From 73012bea0910d41a34261106700ad3a76f1a8035 Mon Sep 17 00:00:00 2001 From: David Akim Date: Tue, 3 Oct 2023 08:55:51 -0400 Subject: [PATCH] Added David art - Star --- drawfunctions/david_akim.py | 24 ++++++++++++++++++++++++ main.py | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 drawfunctions/david_akim.py diff --git a/drawfunctions/david_akim.py b/drawfunctions/david_akim.py new file mode 100644 index 0000000..31d15c0 --- /dev/null +++ b/drawfunctions/david_akim.py @@ -0,0 +1,24 @@ +from turtle import Turtle +from turtle import Screen + +def star(): + + turtle = Turtle() + screen = Screen() + screen.colormode(255) + + turtle.hideturtle() + turtle.penup() + turtle.setposition((20, 20)) + turtle.begin_fill() + turtle.pendown() + turtle.color((255, 215, 0), (255, 215, 0)) + turtle.forward(50) + for i in range(9): + if i%2==1: + turtle.left(72) + else: + turtle.right(144) + turtle.forward(50) + turtle.penup() + turtle.end_fill() \ No newline at end of file diff --git a/main.py b/main.py index 1f0baeb..b785c9f 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,6 @@ from turtle import exitonclick -from drawfunctions import dominic_duffin +from drawfunctions import david_akim -dominic_duffin.christmas_tree() +david_akim.star() exitonclick() \ No newline at end of file