Really basic problem

2007-10-08 Thread tomamil
i know this example is stupid and useless, but that's not the answer
to my question.
here it goes:

status = 0.0
for i in range(10):
   status = status + 0.1

   if status == 0.1:
   print status
   elif status == 0.2:
   print status
   elif status == 0.3:
   print status
   elif status == 0.4:
   print status
   elif status == 0.5:
   print status
   elif status == 0.6:
   print status
   elif status == 0.7:
   print status
   elif status == 0.8:
   print status
   elif status == 0.9:
   print status
   elif status == 1.0:
   print status

the expected output:
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0

but it gives me instead:
0.1
0.2
0.4
0.5
0.6
0.7

why?

thanks,

m.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Really basic problem

2007-10-08 Thread tomamil
thanks you all guys for your help, it's really appreciated...

m.

-- 
http://mail.python.org/mailman/listinfo/python-list