Skip to content

Commit 131ff45

Browse files
author
DirDraggo
committed
Added comments onto checkerboard
1 parent b57ef0d commit 131ff45

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

CodeHS/2/19/6/Checkerboard-Travis.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
speed(0)
22
setposition(-200,-200)
3-
def make_square(color_square):
3+
def make_square(color_square): ##Creates one square 40x40 pixels with color color_square
44
color(color_square)
55
begin_fill()
66
for i in range(4):
77
forward(40)
88
left(90)
99
end_fill()
10-
def make_row(first_color, second_color):
10+
def make_row(first_color, second_color): ## creates a row of 10 squares with alternating colors between first_color and second_color
1111
mod_check=0
1212
for i in range(10):
1313
if mod_check%2==0:
@@ -16,17 +16,17 @@ def make_row(first_color, second_color):
1616
make_square(second_color)
1717
forward(40)
1818
mod_check=mod_check+1
19-
def up_a_row():
19+
def up_a_row(): ## moves tracy up a row
2020
penup()
2121
backward(400)
2222
left(90)
2323
forward(40)
2424
right(90)
25-
def make_two_rows():
25+
def make_two_rows(): ## makes a row with red,black and a row on top of it with black,red
2626
make_row("red", "black")
2727
up_a_row()
2828
make_row("black", "red")
29-
def make_checkerboard():
29+
def make_checkerboard(): ##makes the checker board using make_two_rows and up_a_row
3030
for i in range(5):
3131
make_two_rows()
3232
up_a_row()

0 commit comments

Comments
 (0)