- 3

What does == mean

4th Nov 2017, 1:02 PM
Festus Mabale
Festus Mabale - avatar
8 odpowiedzi
+ 3
It's the operator for equality. It checks whether the left operand is equal to the right operand. The result is a boolean True or False. 5 == 5 - result is True. 5 == 6 - result is False. "Peter" == "petar" - False "Петър" == "Peter" - False "Peter" == "Peter" - True
4th Nov 2017, 1:12 PM
Boris Batinkov
Boris Batinkov - avatar
+ 2
It is something that checks if the thing to the left is the same as the thing to the right.
4th Nov 2017, 1:07 PM
Max S
+ 2
it check if the two variables is equal and returns a boolean.
4th Nov 2017, 1:08 PM
Shawaine
Shawaine - avatar
0
For example: x=0 y=0 If x==y: print("It is equal.")
4th Nov 2017, 1:09 PM
Max S
0
The boolean also determines wether to run the indented code (True) or ignore it (False).
4th Nov 2017, 1:10 PM
Max S
0
Thanks
4th Nov 2017, 1:11 PM
Festus Mabale
Festus Mabale - avatar