Re: [Tutor] range() fractional increment

2009-03-31 Thread Alan Gauld
"james carnell" wrote example: x row = 25 : col = 10 x row = 26 : col = 10.3 x row = 27 : col = 10.6 0x000 row = 28 : col = 11 for col in range(10,12, 0.3): #<- Crash Bang doesn't work 0.3 = zero = infinite loop? If you know the limits (rather than their being variables) you c

Re: [Tutor] range() fractional increment

2009-03-31 Thread Ionut Vancea
Hi, On Tue, Mar 31, 2009 at 4:44 AM, james carnell wrote: > 1) I feel dumb for asking this. > 2) I looked for 20 minutes and didn't find an answer > > Trying to make a drawLine function in a 2d array. > > example: > x   row = 25 : col = 10 > x   row = 26 : col = 10.3 > x   row = 27 :

Re: [Tutor] range() fractional increment

2009-03-31 Thread spir
Le Mon, 30 Mar 2009 20:44:28 -0700 (PDT), james carnell s'exprima ainsi: > 1) I feel dumb for asking this. > 2) I looked for 20 minutes and didn't find an answer > > Trying to make a drawLine function in a 2d array. > > example: > x   row = 25 : col = 10 > x   row = 26 : col = 10.3 > x0

Re: [Tutor] range() fractional increment

2009-03-30 Thread Lie Ryan
John Fouhy wrote: 2009/3/31 james carnell : for row in range(25,31,1): for col in range(10,12, 0.3): #<- Crash Bang doesn't work 0.3 = zero = infinite loop? [...] is there no way to do it with a range function (and have it still look like you're not on crack)? Well, you could do this: [

Re: [Tutor] range() fractional increment

2009-03-30 Thread John Fouhy
2009/3/31 james carnell : > for row in range(25,31,1): >     for col in range(10,12, 0.3):  #<- Crash Bang doesn't work 0.3 = zero = > infinite loop? > [...] > is there no way to do it with a range function (and have it still look like > you're not on crack)? Well, you could do this: >>> [float(x

[Tutor] range() fractional increment

2009-03-30 Thread james carnell
1) I feel dumb for asking this. 2) I looked for 20 minutes and didn't find an answer Trying to make a drawLine function in a 2d array. example: x   row = 25 : col = 10 x   row = 26 : col = 10.3 x   row = 27 : col = 10.6 0x000   row = 28 : col = 11 0x000   row = 29 : col = 11.3 0x000