2.10. Order of Operations

When more than one operator appears in an expression the order of evaluation depends on the rules of precedence. A complete explanation of precedence can get complicated, but just to get you started:

Observe the output of the code below to see how the placement of parentheses can change the result of a calculation.

Note

The following module will walk you through an example of the rules of precedence. Answer the questions in order to check what you remember about the order of operations!

Once you’ve submitted your answer for Question 3A, click on Question 3B below.

Once you’ve submitted your answer for Question 3B, click on Question 3C below.

Once you’ve submitted your answer for Question 3C, click on Question 3D below.


More to Explore

You have attempted of activities on this page