def go_to_next_row(): turn_left() move() turn_left() while not wall_in_front(): move() turn_around()
def reposition_one(): turn_around() move() move() move() move() turn_left() move() move() turn_left()
turn_right() move_x(2) def down_3_steps(): for r in range(0, 3): move_x(2) turn_left() move() turn_right() take() up_3_steps() put() turn_around() down_3_steps() ################################################################ # WARNING: Do not change this comment. # Library Code is below. ################################################################ def turn_right(): for r in range(0, 3): turn_left() def move_x(x): for x in range(0, x): move()
def corner(): turn_right() move() turn_left() move() turn_around()
def go_to_next_row(): turn_left() move() turn_left() while not wall_in_front(): move() turn_around() while True: clear_row() try: go_to_next_row() except ReeborgError: break turn_around() while front_is_clear(): move() turn_right() while front_is_clear(): move() turn_right() move() while carries_object("leaf"): put("leaf") turn_around() move() turn_around() build_wall()