• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
0

Why does this code return False?

https://code.sololearn.com/cNmOifI5l32x/?ref=app

floatpython3
25th Jul 2020, 3:26 AM
Sagar
Sagar - avatar
2 Answers
+ 10
https://www.sololearn.com/Discuss/2348045/?ref=app https://www.sololearn.com/Discuss/1477626/?ref=app https://www.sololearn.com/Discuss/374762/?ref=app
25th Jul 2020, 3:38 AM
Simba
Simba - avatar
0
Sagar Sikchi Samsil Arefeen Because computer returns 0.1 + 0.2 = 0.30000000000004 that's why output is False. Get more explaination here.. https://techtalkbook.com/why-0-1-0-2-does-not-equal-0-3/
25th Jul 2020, 5:29 AM
AÍąJ
AÍąJ - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Is anyone else experiencing this Sololearn issue?
0 Votes
Best language?
0 Votes
How do I keep myself motivated in coding
0 Votes
Bro can you fix yt error?
0 Votes
Anyone have song names? Comment your favorites here for a project im working on
1 Votes
I want to know how to make an Payment App like what I need to learn I need some guidance
0 Votes
Learn - multiple choice course questions display in one box making it impossible to continue
1 Votes
Need suggestions to learn AI and ML
1 Votes
Bug in Completing AI Practice
0 Votes
Duration of heart refilling
0 Votes