0

why 7>7.0 😣?

13th Feb 2017, 11:44 AM
WHyItZZ ÆWSM
WHyItZZ ÆWSM - avatar
6 Answers
+ 5
7 = integer 7.0 = float point Integers ALWAYS > float points
13th Feb 2017, 12:10 PM
1-up Man
1-up Man - avatar
+ 2
print(7>7.0) would return False.
20th Feb 2017, 7:55 PM
Ritesh Kumar
+ 1
7==7.0 in python. I think u have done it in older version
1st Mar 2017, 2:03 PM
Vallapureddy Vineeth Reddy
Vallapureddy Vineeth Reddy - avatar
0
try it print (7.0==7) true will be the output! both are same!
25th Feb 2017, 2:41 AM
Murali EMD
Murali EMD - avatar
0
You would've probably used the older versions of Python IDE. Both are same. Try doing it on 3.x versions of Python IDE Tried sample : if 7 > 7.0: print("True") else : print("False") False
27th Feb 2017, 11:41 AM
Akhil Haridasan
Akhil Haridasan - avatar
0
7 >= 7.0 and 7 <= 7.0 is True 9 > 9.0 and 9 < 9.0 is False hope this helps!
22nd Nov 2018, 2:44 AM
Nate
Nate - avatar