From ac1f95404b17fd3c5fbab5999be1a442082b2e44 Mon Sep 17 00:00:00 2001 From: Lauren Dawnkaski Date: Fri, 20 Sep 2024 13:04:25 -0400 Subject: [PATCH] I completed checkpoint 3 I do think I will write doctrings because it will help me to easily remember what a line of code means without having to dissect it. This will lead to easier implementation of each code. --- __pycache__/tile.cpython-312.pyc | Bin 0 -> 2156 bytes __pycache__/tile_grid.cpython-312.pyc | Bin 0 -> 1593 bytes tile.py | 10 ++++++---- tile_grid.py | 13 +++++++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 __pycache__/tile.cpython-312.pyc create mode 100644 __pycache__/tile_grid.cpython-312.pyc diff --git a/__pycache__/tile.cpython-312.pyc b/__pycache__/tile.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4e568ecd33a976d65ab5ae2ddfbfb791d9b74d55 GIT binary patch literal 2156 zcmbVN&1)M+6rWj*q?IhCQRf|sJ z?KRhL)H-g|tT};@)%A|EP;L8ev;aD*H5X2{BRBA?c;bP#6!y8D0YNnEb`2 z`eK*8J7AUm+)Fld08;X1S10JXS4S*krI)`Z^njZ%They|FHlJiu-i(iJi4M`s{*hp zdq_-Nr~r9P2CNi+x65V*tQdc|^@W-M=?NDZ2oTf3ZLpM%uAm#F2PTEl1Etg46`7P2 z57$GmloVamV`JP7`uu;^&a!#B7YJI9|HO2TUOK0vQ}=d>m0j7xi`>H-O|q+=?X2xR z0N%>)bcTn z=eBe4qiu8Z-hdrR+2&pSx3xT;Qg{nGrS1TePO0N|b9%ctzS`rRx`j;N3x1Fx$Et-c zz_B8silISdk}Q-(yQL=Ks3Z@(2s%FWFjKf;Wc$vjFANLhGHg;vuD}dY1&g?_`8nR+ z@YW`_?v4XGs*(Gkk_L2K#*5^8F#IDu5125HtK-QPM!Fe`_2w3JhqU>yuz67Dp(`Z! zq~C~|{2}(YhYAZ?y$wXeR<_@e8n&7OnPn)fdhCTlhWI>iJ_LOMc!h++4BrO=pf67K z?Vrt<4a~Rt>`8fGmf|meGGAp$<()I&qjDPl2AP0|XJ_;n!6RZ=ncmGqFr#cnG|=iH z%Wv?gt$YX^_WGy^y&rRYeuxSBc+PQ^qdR&|*}`py>E<>AXDcKhzzh)&#;zDI#UJl7brmeDYv@p_4Ns#G$#q=78XbE2QUBIUHm&_!u?k5J zE+g`!epH67Ti3PDQ5`dl80{ok*Kf6>7ewposJ=FDuLq*-$xoF9JMi@I7Lb23l+pp2 o+-DhjdB14T%D!2m<^5SkFYK2X{FV$@Fbz8M$|N+mmDe`^1wT@(6951J literal 0 HcmV?d00001 diff --git a/__pycache__/tile_grid.cpython-312.pyc b/__pycache__/tile_grid.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6ec06088d924c9a92663d883cf68bb8e907f24b0 GIT binary patch literal 1593 zcmb7E&ube;6rNe_$}3xviBs22)Vh;ULN*wSG2Y!r~Hd2nRfbyKU#HBuYqfyi}pEk8k)H6F|Gvn$Yb=LrCxLJ_d zWX>`_U;vAz^wKMuW@>&?g)1h@04)R0(OVGDiKJsom%bk98|2@C9g;Dz+-N@KaKO`I(X!!7RYMikx)z9Zfppr9WjSp zYpOBpMcks87Y>Rcd#bV+a-i@=tl-LXUA)x98HY=*yZJ8s!wz-XAdQ# zLsm95RH|uqm}#0*=|$c)PYWk9O=*(SPLze~Fg?aT-YMUSxQNQW6AK==fMd&vw!HEN zkG5pkDmR@iFR0rH+OCE!FE`uO%jG!mED3tj+awgp|P-~=hy zBmzYVE#H7ZQgXfXJGTeGO|F0Qy?J&|FAa3FxAf@NkeBcd4m&N?ag>I!ag>I=qqxFwuZVI`ZS~Q-)(qX)=hww5nDF)puRF+4 gN{@?#F8@xxIMf&DrNgrtWrwCt3rBgK7FCFU0O%!Xod5s; literal 0 HcmV?d00001 diff --git a/tile.py b/tile.py index 697cf8e..adc3916 100644 --- a/tile.py +++ b/tile.py @@ -10,15 +10,15 @@ def draw_tile_outline(size): square(size) def draw_squiggle(size): - forward(size/4) + forward(3*size/4) pencolor("black") left(90) - quarter_arc_right(size/4) - quarter_arc_left(size/4) quarter_arc_left(size/4) quarter_arc_right(size/4) + quarter_arc_right(size/4) + quarter_arc_left(size/4) left(90) - fly(size/4) + fly(3*size/4) left(90) fly(size) left(90) @@ -42,3 +42,5 @@ def quarter_arc_right(radius): def quarter_arc_left(radius): "Draws a quarter of an arc, turning to the left." circle(radius, 90) + +input() \ No newline at end of file diff --git a/tile_grid.py b/tile_grid.py index 72a0f43..eabbec8 100644 --- a/tile_grid.py +++ b/tile_grid.py @@ -10,7 +10,15 @@ from tile import fly def draw_tile_grid(width, height, tile_size, tile_function): """Draws a (width x height) grid, with tile_function drawn on each tile. - (Your explanation here.) + (draw tile grid creates a grid where width represents how many tiles wide, + heigh represents how many tiles high, tile_size represents the length of 1 side + of the tile, and tile_function represents what is drawn inside the tile like draw_squiggle + from tile.py. The function will draw 1 tile then fly the length of tile_size to move + on to draw the next tile. Then it will return to the beginning of the row by flying + backwards the length of each tile side time the number of tiles in the width. Then the + function will move up to draw the next row by turning and flying to reset. This will + repeat for as many times as the height calls for. At the very end the cursor will move + back to the very beginning by turning and flying the tile_size times the height.) """ for y in range(height): for x in range(width): @@ -36,7 +44,8 @@ def move_up_one_row(tile_size): fly(tile_size) right(90) - + +done()