From 1b4dbcbf2a2e74f1c17525982a142640ef78d366 Mon Sep 17 00:00:00 2001 From: Jagdamba Tripathi <54079135+jagdtri2003@users.noreply.github.com> Date: Sun, 16 Oct 2022 08:15:52 +0530 Subject: [PATCH] Create Design1.py Color Changing Pattern using Turtle --- scripts/Turtle Graphics/Design1.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/Turtle Graphics/Design1.py diff --git a/scripts/Turtle Graphics/Design1.py b/scripts/Turtle Graphics/Design1.py new file mode 100644 index 0000000..17aa89b --- /dev/null +++ b/scripts/Turtle Graphics/Design1.py @@ -0,0 +1,21 @@ +import turtle as t + +t.bgcolor("black") +t.speed(0) +t.pensize(2) + +colors=['red','yellow','blue','purple','green','#fe019a','black','white','red','yellow','blue','purple','green','#fe019a','black','white'] + +distance=170 +t.hideturtle() + +for color in colors: + t.color(color) + for j in range(8): + t.left(45) + for i in range (2): + t.forward(distance) + t.left(60) + t.forward(distance) + t.left(120) +t.done()