On Mon, Dec 01, 2008 at 12:59:23PM -0800, Steve Willoughby wrote: > > void drawSquare1() { > > if(x1<0 || x1>width-size) { > > x1Speed = -x1Speed; > > } > > > > if(y1<0 || y1>height-size) { > > y1Speed = -y1Speed; > > } > > def drawSquare1(): > if (x1 < 0 or x1 > width-size): > x1 += x1Speed > y1 += y1Speed > rect(x1, y1, size, size)
I think my eyes skipped somewhere while copying that over. The exact translation of that code snippet would of course have been: def drawSquare1(): if x1 < 0 or x1 > width-size: x1Speed = -x1Speed if y1 < 0 or y1 > height-size: y1Speed = -y1Speed Sorry 'bout that. -- Steve Willoughby | Using billion-dollar satellites [EMAIL PROTECTED] | to hunt for Tupperware. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor