~cpp def turnRight(): repeat(turn_left,3) def turnBack(): repeat(turn_left,2) def moveFrontPick(): while(1): if next_to_a_beeper(): pick_beeper() if not next_to_a_beeper(): put_beeper() if front_is_clear(): move() else: break def moveBackPick(): if not next_to_a_beeper(): put_beeper() else: move() def checkLine(): moveFrontPick() turnBack() repeat(moveBackPick,6) turnRight() move() turnRight() ##main repeat(checkLine,6) turn_off()