0
Please can someone tell me what this means for me python question; what does this sign mean (-=) ,(<=),(+=),(>=)
2 Respuestas
+ 3
-= means decrease by
example:
a = 5
a -= 2
print(a)
will output 3
+= means increase by
example:
a = 5
a += 2
print(a)
will output 7
<= means less or equal
print(5 <= 5) # this will be true because 5 is equal to 5
print(3 <= 5) # this will be true because 3 is less than 5
print(7 <= 5) # this will be false because 7 is greater than 5
>= means bigger or equal
print(5 >= 5) # this will be true because 5 is equal to 5
print(3 >= 5) # this will be false because 3 is less than 5
print(7 >= 5) # this will be true because 7 is greater than 5
I hope this helps :)
0
Thanks