Really basic problem
- From: tomamil <tomamil@xxxxxxxxx>
- Date: Mon, 08 Oct 2007 09:39:31 -0000
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.
.
- Follow-Ups:
- Re: Really basic problem
- From: Zentrader
- RE: Really basic problem
- From: Andreas Tawn
- Re: Really basic problem
- From: John Machin
- Re: Really basic problem
- Prev by Date: Re: Top Programming Languages of 2013
- Next by Date: Re: Really basic problem
- Previous by thread: pytz has so many timezones!
- Next by thread: Re: Really basic problem
- Index(es):