def turn_right(): repeat(turn_left,3) def pick_move(): pick_beeper() move() # picks up all beepers in one # row def one_row(): repeat(pick_move, 5) pick_beeper() # picks up a row from left to right, # turns around and goes up one line, # picks up the next row, # turns around and goes up one line def two_rows(): one_row() turn_around_left() one_row() turn_around_right() def turn_around_left(): turn_left() move() turn_left() def turn_around_right(): turn_right() move() turn_right() move() repeat(two_rows, 3) turn_off()