On Wed, Dec 16, 2020 at 3:16 AM David Mertz <me...@gnosis.cx> wrote:
>
> On Tue, Dec 15, 2020 at 11:22 AM Chris Angelico <ros...@gmail.com> wrote:
>> I'm pretty sure most of us learned *in grade school* about BOMDAS or
>> BODMAS or PEMDAS or whatever mnemonic you pick.
>
> I don't think I ever learned such acronyms! I mean, yes I learned about order 
> of operations in grade school.  But never with a mnemonic.

I learned BOMDAS - Brackets, O (varies in expansion but always minor
things you don't often see), Multiplication, Division, Addition,
Subtraction. For some reason it's also written BODMAS, which has the
exact same meaning (since multiplication and division have the same
precedence) but is harder to pronounce. PEMDAS uses "parentheses"
instead of "brackets" (so it's probably an American English vs British
English thing), and "exponentiation" in place of the first vowel.

Whichever way you learned it, though, you probably learned a few
quirks of algebraic notation that don't really apply to programming
(such as the fraction bar), but for the most part, you'd have learned
the exact model that most expression evaluators use.

("Most" because, as always, there are exceptions, but it's a good
default to start with.)

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/7YMTCRDYK5KX3UA26AIQFC6Z5A4CIUIL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to