+ 1
9>9.0is false then why 9>=9.0 is true
5 Réponses
+ 5
>= means greater than or equal to. 9 is equal to 9.0 so it is true.
+ 3
Well, it's because the first statement, 9 > 9, is false because the integer 9 is not greater than 9. The second statement, however, is true because 9 is greater than or equal to 9, in this case being equal to itself.
The >= and <= signs are used to test if variables are either greater than or equal to or less than or equal to each other respectively.
+ 1
Because 9 is equal to 9 in both cases.
0
there is also a operator "=" which actually has some meaning like
"women's day>=hell day"
happy women's day
0
here 9>=9.0 the integer will be converted to float 9.0 so the output "True"
if the condition is 9.0<=9
the float value will be converted to integer 9. so the output will "True"