Why bool_three came out to be False?


#1

And

Can someone explain to me why bool_three came out to be False? 3.0 and 3 are two different data types, so shouldn’t “19 % 4 != 300 / 10 / 10” yield to false?


How are we supposed to evaluate if these are True or False?
#2
a = 19 % 4         =>  3
b = 300 / 10 / 10  =>  3

a != b  ?          =>  False

In Python 2, division gives integer quotients. In Python 3, division gives float quotients, but when comparing 3.0 to 3, we still get True.

>>> 3 == 3.0
True
>>> 

#3

Sounds good, thank you!