draw a series of rows of boxes for each row in range number

# draw a series of rows of boxes for each row in range (number of rows): # draw a series of boxes in a horizontal line for each column in range (number of columns): draw_grey_box () else: draw white box () goto_next_box_pos () goto next row pos ()

Solution

for each_row in range(number_of_rows): for each_column in range(number_of_columns): if ((each_row + each_column) % 2) == 0: #that both rows and columns alternate colours draw_black_box() else: draw_white_box() goto_next_box_pos() goto_next_row_pos()
 # draw a series of rows of boxes for each row in range (number of rows): # draw a series of boxes in a horizontal line for each column in range (number of colu

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site