Re: [Tutor] skipping ahead within a loop

2007-03-15 Thread Clay Wiedemann
Thanks, this is not too much information at all. I am always happy with depth. -c On 3/15/07, Dave Kuhlman <[EMAIL PROTECTED]> wrote: > On Thu, Mar 15, 2007 at 03:35:27PM +0100, Rikard Bosnjakovic wrote: > > On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote: > > > If doing a loop, how can one

Re: [Tutor] skipping ahead within a loop

2007-03-15 Thread Dave Kuhlman
On Thu, Mar 15, 2007 at 03:35:27PM +0100, Rikard Bosnjakovic wrote: > On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote: > > If doing a loop, how can one skip forward a specific amount randomly > > determined within the loop? > > y = 0 > while y < HEIGHT: > linewidth = random(3, 9) > # dra

Re: [Tutor] skipping ahead within a loop

2007-03-15 Thread Kent Johnson
Rikard Bosnjakovic wrote: > On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote: >> If doing a loop, how can one skip forward a specific amount randomly >> determined within the loop? > > y = 0 > while y < HEIGHT: > linewidth = random(3, 9) > # drawlines etc > y += linewidth > > The reaso

Re: [Tutor] skipping ahead within a loop

2007-03-15 Thread Rikard Bosnjakovic
On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote: > If doing a loop, how can one skip forward a specific amount randomly > determined within the loop? y = 0 while y < HEIGHT: linewidth = random(3, 9) # drawlines etc y += linewidth The reason why you cannot alter the for-variable beats

Re: [Tutor] skipping ahead within a loop

2007-03-15 Thread Jorgen Bodde
Maybe use a while loop? y = 0 while y < HEIGHT: linewidth = random(3,9) y += linewidth Regards, - Jorgen On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote: > If doing a loop, how can one skip forward a specific amount randomly > determined within the loop? > Below is a boiled down ve

[Tutor] skipping ahead within a loop

2007-03-15 Thread Clay Wiedemann
If doing a loop, how can one skip forward a specific amount randomly determined within the loop? Below is a boiled down version of what I am trying (HEIGHT and random come from NodeBox). I imagine a simple solution is out there, my searches failed me for y in range(HEIGHT): linewidth = r