How this loop is performing and why it doesn't print 2.399999999999999
i = 1.2
while i < 2.4:
print(i)
i += 0.2
Also when I tried :
2.39999999999999999 < 2.4
I got False
But when I tried :
2.399999999999999 < 2.4
I got True
Can anyone explain why it is so ?