Hello,
I am a newbie in Python and maybe this is a stupid question, but when I run this code I receive a very strange output.
status = 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:
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
At first I supposed that I will receive something like this:
>>>
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
>>>
But finally I was really surprised. Output looks like this:
>>>
0.1
0.2
0.4
0.5
0.6
0.7
>>>
Could somebody tells me what I am doing wrong?