-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6.1.6 Checkerboard
61 lines (57 loc) · 1.1 KB
/
6.1.6 Checkerboard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
speed(0)
color_value = "red"
def draw_squarerow():
for i in range(5):
pendown()
begin_fill()
color("red")
for i in range(4):
forward(40)
left(90)
end_fill()
penup()
forward(40)
pendown()
begin_fill()
color("black")
for i in range(4):
forward(40)
left(90)
end_fill()
penup()
forward(40)
def draw_squarerowalt():
for i in range(5):
pendown()
begin_fill()
color("black")
for i in range(4):
forward(40)
left(90)
end_fill()
penup()
forward(40)
pendown()
begin_fill()
color("red")
for i in range(4):
forward(40)
left(90)
end_fill()
penup()
forward(40)
def up_one():
left(90)
forward(40)
right(90)
backward(400)
penup()
setposition(-200,-200)
for i in range(5):
draw_squarerow()
up_one()
draw_squarerowalt()
up_one()
penup()
color("black")
setposition(-200,-200)