Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
In such case precedence rules will be applied. For Example 2* 5 +10 multiple has higher precedence than addition so first of all 2*5 will be solved first and then will add to ten. Below link has complete table of procesence for python https://www.tutorialspoint.com/python/operators_precedence_example.htm One more thing If same arithmetic operators are used then left to right rule will be applied in such cases. like 2*5*10-50 so using left to right 2*5 will solve first 10*10-50 # now multiply has higher precedence so 100-50 50
1st Nov 2016, 5:42 AM
Waqas Asghar Bhalli
Waqas Asghar Bhalli - avatar