Articles → Python → Order Of Calculation In Python

Order Of Calculation In Python






PEMDAS







Example




#PEMDAS Stands For

#P stands for Parenthesis
#E stands for Exponent
#M stands for Multiplication
#D stands for Division
#A stands for Addition
#S stands for Subtraction


print(2-3*5)
print(2**3*5)
print((2-3)*5)









Output


Picture showing the output of how the order of calculation works in python



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

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250