+ 1

Why 9 >= 9.0? Anyone tell me why?

26th Jan 2016, 12:29 AM
zhihuai
5 Respuestas
+ 4
in python,if you satisfy either of the two operators it gives a true value. so u see 7 >= 7.0 will give the value true
30th Jan 2016, 10:20 PM
Gaurav Hegde
Gaurav Hegde - avatar
+ 3
you are asking python if 9 is greater than 9.0 OR 9 is equal to 9.0. OR returns true if any of the options are true. in this case the second query is true
6th Sep 2016, 8:11 PM
David D'souza
David D'souza - avatar
- 2
Because 9 is integer and 9.0 is float. I guess am right with my explanations.
29th Jun 2016, 2:21 PM
Salau Ibrahim Babatunde
Salau Ibrahim Babatunde - avatar
- 2
because 9.0 is a float which means it ends with a .0 and 9 is just a integer but they both have the same value
6th Jul 2016, 9:10 PM
Emanuel zamorano
Emanuel zamorano - avatar
- 3
because 9.0 is a float which means it ends with a .0 and 9 is just a integer but they both have the same value
7th Jul 2016, 12:53 AM
Farshad Nematpour
Farshad Nematpour - avatar