Python program to perform the arithmetic operations
kw.py
print("_______________________________________")
print("Program for the arithmetic operations")
print("_______________________________________")
a=3.6
b=1.3
print("  Value of a  |",a)
print("  Value of b  |",b)
print("_______________________________________")
c=a+b
print("    Addition  |",c)
c=a-b
print("Subtraction   |",c)
c=a*b
print("Multiplication|",c)
c=a/b
print("    Division  |",c)
c=a//b
print("    Division  |",c)
c=a**b
print("         a^b  |",c)
c=a%b
print("    Reminder  |",c)
print("_______________________________________")
Output
kodingwindow@kw:~$ python3 kw.py
_______________________________________
Program for the arithmetic operations
_______________________________________
  Value of a  | 3.6
  Value of b  | 1.3
_______________________________________
    Addition  | 4.9
Subtraction   | 2.3
Multiplication| 4.680000000000001
    Division  | 2.769230769230769
    Division  | 2.0
         a^b  | 5.286804500121683
    Reminder  | 1.0
_______________________________________
Advertisement