generated from mwc/lab_iteration
It's interesting to know the pendown and penup!
This commit is contained in:
BIN
__pycache__/tile.cpython-312.pyc
Normal file
BIN
__pycache__/tile.cpython-312.pyc
Normal file
Binary file not shown.
BIN
__pycache__/tile_grid.cpython-312.pyc
Normal file
BIN
__pycache__/tile_grid.cpython-312.pyc
Normal file
Binary file not shown.
@@ -10,8 +10,17 @@ def square(side_length):
|
|||||||
forward(side_length)
|
forward(side_length)
|
||||||
right(90)
|
right(90)
|
||||||
|
|
||||||
|
sizes = [20, 40, 60, 80, 100]
|
||||||
|
for size in sizes:
|
||||||
|
square(20)
|
||||||
|
penup()
|
||||||
|
forward(40)
|
||||||
|
pendown()
|
||||||
|
|
||||||
sizes = [20, 40, 60, 80, 100]
|
sizes = [20, 40, 60, 80, 100]
|
||||||
for size in sizes:
|
for size in sizes:
|
||||||
square(size)
|
square(size)
|
||||||
|
|
||||||
input()
|
input()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user