def home(): turn_left() move() turn_right() move_x(2) turn_right() move()
def jump(): turn_left() move() turn_right() move() turn_right() move() turn_left()
def home(): while object_here(): take() turn_left() move() turn_right() move_x(2) turn_right() move()
def corner(): turn_right() takeobject() move() turn_left() takeobject() move() turn_around() takeobject()
def jump(): turn_left() while wall_on_right(): move() turn_right() move() turn_right() while front_is_clear(): move() turn_left()
def bypass(): takeobject() turn_right() move() turn_left() move() move() turn_left() move() turn_right() takeobject()
def right(): while object_here(): take() turn_right() if wall_in_front(): turn_around() while front_is_clear(): move() dump() #break else: move() turn_right()
def draw_zero(): #robot will draw a number zero draw_one() turn_right() move() put() move() turn_right() draw_one() turn_right() move() put()
while object_here(): take() if front_is_clear(): move() else: if count%2: turn = turn_right else: turn = turn_left turn() if front_is_clear(): move() turn() count += 1 else: turn_right() clear_move() break while carries_object(): put() turn_back() clear_move() turn_left() clear_move() ################################################################ # WARNING: Do not change this comment. # Library Code is below. ################################################################ def multi_move(count=1): for _ in range(count): move()
def up_3_steps(): for r in range(0, 3): turn_left() move() turn_right() move_x(2)
def down_3_steps(): for r in range(0, 3): move_x(2) turn_left() move() turn_right()
def right(): while object_here(): take() turn_right() move() turn_right()
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() done()
def right(): for r in range(0, 2): turn_right() move()