Re: [Tutor] Using exec with dict

2005-01-30 Thread Danny Yoo
On Mon, 31 Jan 2005, [ISO-8859-1] André Roberge wrote: > >/ I have a "robot" that can do some actions like "move()" and > />/ "turn_left()". I can program this robot using python like this: > />/ > />/ .def move_and_turn(): > [snip]// > />/ The question I have is: how do I do this with an

Re: [Tutor] Using exec with dict

2005-01-30 Thread Kent Johnson
André Roberge wrote: I have a "robot" that can do some actions like "move()" and "turn_left()". I can program this robot using python like this: .def move_and_turn(): .move() .turn_left() . .def draw_square(): .for i in range(4): .move_and_turn() . .draw_square()