+ 1
Difference between “<=“ and “<“ ??
I DID A TEST WITH THOSE TWO SYMBOLS AND I GOT THE SAME RESULTS. WHY??? DO THEY BOTH HAVE THE SAME CONCEPT AND USE??
8 ответов
+ 5
"a <= b" means a is less than OR equal to b
"a < b" means a is less than b it can't be equal
For example:-
2<=3 is true
2<=2 is also true
2<3 is true
But
2<2 is not true
0
The difference appears in the case where the compared values are equal.
If a and b were equal:
These would be both False:
a < b
a > b
And these would both be True:
a <= b
a >= b
0
Oh okay thx so much it helped but i have a question. So does that mean for example:
>>> 1 <= 2
True
>>> 1 < 2
True
>>> 1 <= 2
True
>>> 2 < 1
False
0
MCPE Gaming Those 4 comparisons don't describe the difference between <= and < , but they are not wrong.
0
oh oops but so its correct?
0
MCPE Gaming They are all correct.
0
okay thx