5 Dec 2020

Arithmetic operators

                      Arithmetic operators are used to perform mathematical operations like addition, subtraction, multiplication, etc. . . 

                 


      

Example :
a=10
b=5
print("a+b=",a+b)
print("a-b=",a-b)
print("a*b=",a*b)
print("a/b=",a/b)
print("a%b=",a%b)
print("a//b=",a//b)
print("a**b=",a**b)

output:
15
5
50
2.0
0
2
100000

No comments:

Post a Comment

Operator precedence

           When an expression contains more than one operator, the order of evaluation depends on the order of operations.            The ac...