Skip to Content
Getting Started with Processing.py
book

Getting Started with Processing.py

by Allison Parrish, Ben Fry, Casey Reas
May 2016
Beginner content levelBeginner
242 pages
4h 19m
English
Make: Community
Content preview from Getting Started with Processing.py

Appendix C. Order of Operations

When mathematical calculations are performed in a program, each operation takes place according to a prespecified order. This order of operations ensures that the code is run the same way every time. This is no different from arithmetic or algebra, but programming has other operators that are less familiar.

In the following table, the operators on the top are evaluated before the operators later in the list—e.g., multiplication will be evaluated before addition.

Name Symbol Examples

Parentheses

()

a * (b + c)

Unary negation

-

-x

Multiplicative

* / %

a * b

Additive

+ −

a + b

Comparisons

> < <= >= == != in

if a > b

Logical NOT ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Introduction to D3.js with React

Introduction to D3.js with React

Adam Janes

Publisher Resources

ISBN: 9781457186820Errata Page