[Tutor] Livewires - stuck on a class

Tonu Mikk tmikk at umn.edu
Tue Aug 14 23:23:57 CEST 2007


christopher.henk at allisontransmission.com wrote:
> >Then I was hoping to repeat the sequence for moving the robots placed
> >in 
> >the robots list by using this code:
> >for x in robots:
> >    # code for moving the robots
>
> Glancing at your code to move the robots.  I don't see you using you x 
> from for x in robots.  Since in your placement code robot is assigned 
> to a new robot each time through the loop, the placement works.  In 
> your movement you don't change what robot is representing.
>
> I think you want to change you line:
> for x in robots:
> to become...
> for robot in robots:
>
>
Thank you!  This did the trick. 

Tonu

-- 
Tonu Mikk
Educational Technology Consultant
Digital Media Center - dmc.umn.edu
tmikk at umn.edu 612 625-9221



More information about the Tutor mailing list