Page 24 - tp_Modula_v2.0
P. 24
Program 2: To perform all the assignment operation.
Program2.py
File Edit Format Run Options Window Help
#examples of assignment operators
a=21
b=10
c=0
c = a + b
print(c)
c += a
print(c)
c *= a
print(c)
c /= a
print(c)
c = 2
c %= a
print(c)
c **= a
print(c)
c //= a
print(c)
On running the above program, you will get the following output:
Output
31
52
1092
52.0
2
2097152
99864
22 Touchpad MODULAR (Version 2.0)

