Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialWinnie E Tibingana
21,066 PointsPEMDAS Execution of order of operations
If PEMDAS reminds one of the order in which the operations in an equation are executed, it implies that multiplication comes before division. Given:
10/2*5
#output = 25
This indicates that multiplication was executed first otherwise the result would be 1. Please advise.
1 Answer
Rick Gleitz
47,876 PointsHi Winnie,
In PEMDAS, multiplication and division actually have equal weight (it's not multiplication then division), so the operations are executed from left to right. So 25 is the right answer. Just for your information, addition and subtraction also have equal weight.
Hope this helps.