0.0
‘//’ is the floor division operator. If we write c = a//b, then a is first divided by b and then c is assigned the value of the quotient. For example,
# Floor division operator value = 11//3 print(value) value = -11//3 print(value)
The above program will print the following output:
3 -4
Please note that if one of the operands is negative, then the result is rounded away from zero.
‘%’ is the modulus operator. If we write a = b % c, then b is divided by c and a is assigned the value of the remainder.
# Modulus Operator value = 12 % 5 print(value)
The output will be:
2
And, the ‘**’ operator is used to perform exponentiation operations on operands. For example,
# Exponent Operator value = 2 ** 3 print(value)
The output will be:
8
2. Python Assignment Operators
The assignment operators are used to assign a value to a variable. For example:








































0 Comments