Re: [Tutor] Range of float value

2007-02-08 Thread Daniel Yoo
On Thu, 8 Feb 2007, Johan Geldenhuys wrote: > OK, this what I wanted: > > I have a value: a = 48.41 > > My lowValue is: lowValue = 48.35 > My highValue is : highvalue = 48.45 Range does not work on floats: it's meant to work on integers. > I though that it could be possible to have a range b

Re: [Tutor] Range of float value

2007-02-08 Thread Kent Johnson
Johan Geldenhuys wrote: > OK, this what I wanted: > > I have a value: a = 48.41 > > My lowValue is: lowValue = 48.35 > My highValue is : highvalue = 48.45 > > if a <= lowValue: > print 'value below limit' > > if a >= highValue: > print value above limit' > > I though that it could

Re: [Tutor] Range of float value

2007-02-08 Thread Johan Geldenhuys
PROTECTED] Sent: 08 February 2007 07:17 PM To: [EMAIL PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] Range of float value 2007/2/8, Johan Geldenhuys mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED]>: Hi all, I have a value that ranges between 48.01 and 48.57. a Float value in othe

Re: [Tutor] Range of float value

2007-02-08 Thread Kent Johnson
Luke Paireepinart wrote: > Kent Johnson wrote: >> Luke Paireepinart wrote: >>> Kent Johnson wrote: You can't generate all the float values in a range. (OK, you probably could, but it would not be practical or useful.) You can test for a value in a range, e.g. if 48.35 <= a <=

Re: [Tutor] Range of float value

2007-02-08 Thread Luke Paireepinart
Kent Johnson wrote: > Luke Paireepinart wrote: >> Kent Johnson wrote: > >>> You can't generate all the float values in a range. (OK, you >>> probably could, but it would not be practical or useful.) You can >>> test for a value in a range, e.g. >>> if 48.35 <= a <= 48.45: >>> >> Kent: >> Why d

Re: [Tutor] Range of float value

2007-02-08 Thread Andre Engels
2007/2/8, Johan Geldenhuys <[EMAIL PROTECTED]>: Hi all, I have a value that ranges between 48.01 and 48.57. a Float value in other words. I want to look at changes in the value. If my normal range is between 48.35 and 48.45, how will I identify the value below 48.35 and above 48.45 ? Somethi

Re: [Tutor] Range of float value

2007-02-08 Thread Kent Johnson
Luke Paireepinart wrote: > Kent Johnson wrote: >> You can't generate all the float values in a range. (OK, you probably >> could, but it would not be practical or useful.) You can test for a >> value in a range, e.g. >> if 48.35 <= a <= 48.45: >> > Kent: > Why does this work? It is explicitl

Re: [Tutor] Range of float value

2007-02-08 Thread Luke Paireepinart
Kent Johnson wrote: > Johan Geldenhuys wrote: > >> Hi all, >> >> I have a value that ranges between 48.01 and 48.57. a Float value in >> other words. >> >> I want to look at changes in the value. If my normal range is between >> 48.35 and 48.45, how will I identify the value below 48.35 an

Re: [Tutor] Range of float value

2007-02-08 Thread Kent Johnson
Johan Geldenhuys wrote: > Hi all, > > I have a value that ranges between 48.01 and 48.57. a Float value in > other words. > > I want to look at changes in the value. If my normal range is between > 48.35 and 48.45, how will I identify the value below 48.35 and above 48.45? > > Something I t

[Tutor] Range of float value

2007-02-08 Thread Johan Geldenhuys
Hi all, I have a value that ranges between 48.01 and 48.57. a Float value in other words. I want to look at changes in the value. If my normal range is between 48.35 and 48.45, how will I identify the value below 48.35 and above 48.45? Something I tried was: for a in range(48.35, 48.45):