def newspaper_variable(): #environment(newspaper.wld) # IA1, IB1a, IB1b, IB3, IIA2, IIIA1, IIIA2 return (environment.newspaper(), """def turn_around(): for i in range(2): turn_left() pos = 1 while True: while front_is_clear(): move() pos += 1 if pos == 10: break turn_left() while not right_is_clear(): move() turn_right() drop_beeper() turn_around() while True: while not left_is_clear() and pos != 1: move() pos -= 1 if pos == 1: break turn_left() while front_is_clear(): move() turn_right() turn_off() """)
def newspaper_fixed(): #environment(newspaper.wld) # IA1 and IB2a return (environment.newspaper(True), """def turn_around(): for i in range(2): turn_left() for i in range(4): move() turn_left() move() turn_right() move() move() drop_beeper() turn_around() move() for i in range(4): move() turn_left() move() turn_right() move() turn_off() """)