PAMDAS RULE #12
Replies: 1 comment
-
The BODMAS and PEMDAS rules are the same and specify the order in which operations should be performed in a mathematical expression. Parentheses should be done first, followed by exponents and roots, then multiplication and division (performed left to right), and finally, addition and subtraction (also performed left to right). Use parentheses to explicitly specify the order in which operations should be performed, especially in more complex expressions. The correct order of operations, also known as the "BODMAS" or "PEMDAS" rule, is an important concept in mathematics and programming. It specifies the order in which different operations should be performed in a mathematical expression, to ensure that the result is correct. The correct way to evaluate the expression "8/2*(2+2)" is as follows: Parentheses: (2+2) = 4 The reason that the expression "8/2(2+2)" gives an error is that the division operator (/ ) has higher precedence than the multiplication operator (). This means that the division should be performed before the multiplication, according to the BODMAS/PEMDAS rule. However, in this case, the multiplication is being performed first, which is incorrect. To Remove this error you can add the operator () between 8/2 and (2+2) |
Beta Was this translation helpful? Give feedback.
-
BODMAS or PEMDAS Rule, which one is better, What programmer think to solve this issue, i tried,
print(8/2(2+2))
it give me an error ...
then I searched it on internet, where I find the Ok go parenthesis first, the Multiplication and Division have same priority so here mathematician apply Left to Right Rule
8/2(2+2) => 8/2(4) => Now Division First will give 4 (4) = 16
Even mathematician can fail Computer ...
Can inferential Statistics
Beta Was this translation helpful? Give feedback.
All reactions