Python Arithmetic Operators

Python Arithmetic Operators

Instructor-svg Al-Mamun Sarkar
Mar 24 , 2020

Example of Python Arithmetic Operators. 

a = 9
b = 4

add = a + b 
sub = a - b 
mul = a * b 
div1 = a / b 
div2 = a // b 
mod = a % b 
  
print(add) 
print(sub) 
print(mul) 
print(div1) 
print(div2) 
print(mod) 

Output:

 

13
5
36
2.25
2
1
  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram