Re: can anyone advise me

2006-04-27 Thread egbert
On Thu, Apr 27, 2006 at 02:48:46AM -0700, [EMAIL PROTECTED] wrote: > why the output of this code : > x = 0 > while x < 10: > z = 0 > print x > x = x + 1 > while z < x: > print z, > z = z + 1 > > is > > 0 > 0 1 > 0 1 2 > 0 1 2 3 > 0 1

Re: can anyone advise me

2006-04-27 Thread micklee74
Dan Sommers wrote: > On 27 Apr 2006 02:48:46 -0700, > [EMAIL PROTECTED] wrote: > > > why the output of this code : > > x = 0 > > while x < 10: > > z = 0 > > print x > > x = x + 1 > > while z < x: > > print z, > > z = z + 1 > > > is >

Re: can anyone advise me

2006-04-27 Thread looping
try something like this: x = 0 while x < 10: z = 0 print '-' + str(x) + '-' x = x + 1 while z < x: print '.' + str(z) + '.', z = z + 1 -- http://mail.python.org/mailman/listinfo/python-list

Re: can anyone advise me

2006-04-27 Thread Gerard Flanagan
[EMAIL PROTECTED] wrote: > why the output of this code : > x = 0 > while x < 10: > z = 0 > print x > x = x + 1 > while z < x: > print z, > z = z + 1 > > is > > 0 > 0 1 > 0 1 2 > 0 1 2 3 > 0 1 2 3 4 > 0 1 2 3 4 5 > 0 1 2 3 4 5 6 > 0 1

Re: can anyone advise me

2006-04-27 Thread Peter Otten
[EMAIL PROTECTED] wrote: > why the output of this code : > x = 0 > while x < 10: > z = 0 > print x > x = x + 1 > while z < x: > print z, > z = z + 1 > > is > > 0 > 0 1 > 0 1 2 > 0 1 2 3 > 0 1 2 3 4 > 0 1 2 3 4 5 > 0 1 2 3 4 5 6 > 0

Re: can anyone advise me

2006-04-27 Thread Dan Sommers
On 27 Apr 2006 02:48:46 -0700, [EMAIL PROTECTED] wrote: > why the output of this code : > x = 0 > while x < 10: > z = 0 > print x > x = x + 1 > while z < x: > print z, > z = z + 1 > is > 0 Okay, that was x, from the print statement

can anyone advise me

2006-04-27 Thread micklee74
why the output of this code : x = 0 while x < 10: z = 0 print x x = x + 1 while z < x: print z, z = z + 1 is 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5 0 1 2 3 4 5 6 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6