0
7 <=8....
why is this true...
8 Respuestas
+ 1
"<=" means lesser or equal to and 7 is less than 8.
+ 1
7<=8
is pretty much the same as
7<9
+ 1
It will returns true Because it's reading it " less or equal " which less is true
+ 1
True
0
Because 7 is smaller or equal then 8.
Every pythton number implements __le__ "magic method", for numbers it is the plain old less then or equal. 7 is less then 8 OR seven is equal to 8? Yes! So it returns True
0
but seven is not equal to eight
0
OR Means exactly that either can be 7== 8 (no) Oooorrrrrr 7< 8 (true)
:)
A OR B is true if a is true and bi is false or if b is true and a is false or if both are true
0
construction <= may be replaced with next: x < y or x == y. You have True (7<8) or False (7==8), result is True.