Articles → Python → Mathematical operator in python

Mathematical operator in python






Mathematical operator



















Example




operand1 = 3
operand2 = 2

print ("addition:", operand1 + operand2) #addition
print ("subtraction:", operand1 - operand2) #subtraction
print ("multiplication:", operand1 * operand2) #multiplication
print ("division:", operand1 / operand2) #division
print ("modules:", operand1 % operand2) #modules
print ("exponent:", operand1 ** operand2) #exponent
print ("Floor division:", operand1 // operand2) #Floor division





Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, February 15, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250