Lesson Progress

0% Complete

Assignment operators(mathematical operator)in Python.

```
x ,y ,z = 26, 18, 0
z = x + b
print('z = x + y assigns value of x + y into z ')
print (f"Value = z is { z }" )
z += a
print('z += x is equivalent to z = z + x ')
print (f"Value = z is { z }" )
z *= a
print('z *= x is equivalent to z = z * a')
print (f"Value = z is { z }" )
z /= x
print('z /= x is equivalent to z = z / a')
print (f"Value = z is { z }" )
z = 2
z %= a
print('z %= x is equivalent to z = z % x ')
print (f"Value = z is { z }" )
z **= a
print('z **= x is equivalent to z = z ** x ')
print (f"Value = z is { z }" )
z //= a
print('z //= x is equivalent to z = z // x ')
print (f"Value = z is { z }" )
```