0

How does max and min function work(equal float numbers) in python?

I used both max and min function for the list [5.00,5.0,5,5.000] and I was surprised to see 5.0 as the answer to both...so can anyone explain this to me? https://code.sololearn.com/crdC1sdIBQtR/?ref=app

8th May 2018, 9:41 AM
Anish
Anish - avatar
3 odpowiedzi
+ 1
https://code.sololearn.com/cba4zZQnFZ30/?ref=app
8th May 2018, 9:59 AM
Yugabdh
Yugabdh - avatar
+ 1
I guess this code will explain all your queries
8th May 2018, 10:00 AM
Yugabdh
Yugabdh - avatar
+ 1
I just realised that the answer is choosen as 5.00(first item ) as all of them are equal and 5.00 is displayed as 5.0.....thanks for the help https://code.sololearn.com/cvq8RK9GMumq/?ref=app
8th May 2018, 10:08 AM
Anish
Anish - avatar