It's interesting to know the pendown and penup!

This commit is contained in:
蔡卓耘 2024-09-25 11:32:18 -04:00
parent 6473cd8724
commit 8d6f889805
3 changed files with 9 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -10,8 +10,17 @@ def square(side_length):
forward(side_length)
right(90)
sizes = [20, 40, 60, 80, 100]
for size in sizes:
square(20)
penup()
forward(40)
pendown()
sizes = [20, 40, 60, 80, 100]
for size in sizes:
square(size)
input()