0

related to this question

i wanna to know that why answer FALSE. beacause 7 and 7.0 are equal. print ( 7 > 7.0) { it is question guys please make me understand.}

8th Sep 2020, 1:30 PM
Peeyush Kumar
Peeyush Kumar - avatar
4 Respostas
+ 3
Peeyush Kumar you are checking if 7 is greater than 7.0 which obviously is false ,they both are equal
8th Sep 2020, 2:06 PM
Abhay
Abhay - avatar
+ 1
Because 7 is an integer and 7.0 is an Float type.
8th Sep 2020, 2:07 PM
Akash Agrawal
Akash Agrawal - avatar
0
You are checking 7>7.0 Which is of course false because they are equal. If you write 7==7.0 Then it might return you true (what you want). 7>7.0 //False 7==7.0 //True 7>=7.0 //True
8th Sep 2020, 4:55 PM
Divya Mohan
Divya Mohan - avatar