+ 1

Why this prints false ?🤔

Type in your code editor :- a = 4.20 b = 2.10 print(a + b == 6.30) Console :- False

9th Nov 2020, 10:30 AM
Omkar Pawar (Coder)
Omkar Pawar (Coder) - avatar
2 Respuestas
+ 4
Because a+b gives 6.30000000000001 , and it's not equal to 6.30
9th Nov 2020, 10:49 AM
Prathvi
Prathvi - avatar
0
In Computer, processing is not like normal adding and subtracting things
9th Nov 2020, 6:39 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar