0.1+0.1+0.1 gives 0.30000...4 | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

0.1+0.1+0.1 gives 0.30000...4

Does anyone know why does happen in Python, tried 0.1+0.1+0.1+0.1 , it gives 0.4 tried it till 0.7. Why is that like that https://code.sololearn.com/cZ1k2oFSeWL2/?ref=app

19th Nov 2019, 6:35 PM
Joseph Ojo
Joseph Ojo - avatar
2 Antworten
+ 2
https://www.sololearn.com/Discuss/2018392/?ref=app
19th Nov 2019, 6:39 PM
Michael
Michael - avatar
+ 1
Michael thanks man
19th Nov 2019, 6:40 PM
Joseph Ojo
Joseph Ojo - avatar