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
?

Something I tried was:

for a in range(48.35, 48.45):
    print a

It gives me a value of 100.

Is it possible to get a range of a float value?


It depends. What would you like it to be? All numbers in that range? They're
uncountably infinite, so no way we could ever get that out of the computer.
All actual float values? Depends too much on the implementation of the
specific machine you're working on to be workable.

Identifying values below 48.35 and above 48.45 is simply done by:
if value < 48.35 or value > 48.45 then...

No need to first create the range of values

--
Andre Engels, [EMAIL PROTECTED]
ICQ: 6260644  --  Skype: a_engels
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to