Boolean 7>7.0 | Sololearn: Learn to code for FREE!

+1

Boolean 7>7.0

How is this "False"?

6/24/2017 5:48:59 PM

John Sitther

3 Answers

New Answer

+8

In math, 7 is equal to 7.0. So they're equal. In other words 7 is not greater than 7.0.

+13

In simple words : 7 is an integer value where as 7.0 is a floating point value. An integer value is always > than the floating point value ^^

0

Well in python terms , float always has a higher precedence than isn't data type , hence 7.0 is always greater than 7