From 56996424d541ca777cfe5e5e1e7465c01a75e850 Mon Sep 17 00:00:00 2001 From: Rebecca Hankey Date: Sat, 28 Sep 2024 17:55:37 -0400 Subject: [PATCH] I started the outlines of my books and the shelf. This was just the beginning of my project. I did find myself wondering if there was a more efficent way of writing the code itself. I tried a few different ways, using different definitions and they all ended up being somehow less effective? So, I settled on going through the actual outlining of the books being manual. I did use docstrings to help myself have a place- holder for major changes and moves. My plan moving forward it to try and incorporate more definitions are create the shapes that will decorate the books themselves and create the texture of the shelf. --- drawing.py | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/drawing.py b/drawing.py index 29fc89e..23e4513 100644 --- a/drawing.py +++ b/drawing.py @@ -5,3 +5,63 @@ # (Briefly describe what this program does.) from turtle import * +penup() +right(180) +forward(200) +pendown() +def rectangle(width,height): + for _ in range(2): + forward(width) + left(90) + forward(height) + left(90) +rectangle(20,100) +left(180) +forward(20) +right(90) +forward(100) +right(180) +forward(200) +right(90) +forward(40) +right(90) +forward(200) +right(180) +forward(215) +right(90) +forward(100) +right(90) +forward(215) +right(180) +"all above after large book, and turned around" +rectangle(20,100) +"above is bottom decoration on large book" +forward(150) +right(90) +forward(75) +right(90) +"below standard book" +forward(150) +right(180) +forward(150) +right(90) +forward(76) +right(90) +forward(150) +right(180) +forward(200) +right(90) +forward(76) +right(90) +forward(200) +right(90) +forward(500) +"below starts the wooden shelf below" +left(90) +forward(50) +left(90) +forward(600) +left(90) +forward(50) +left(90) +forward(100) \ No newline at end of file