Changes

Jump to: navigation, search

OPS435 Python Lab 1

12 bytes added, 12:20, 16 May 2017
PART 5 - MATH OPERATORS
10 / 5 # division
10 ** 5 # exponents
</source><br>NOTE: You must be careful when combining more complex math operators together. Python uses '''PEMDAS''' ('''P'''arentheses, '''E'''xponents, '''M'''ultiplication and '''D'''ivision, '''A'''ddition and '''S'''ubtraction) to resolve math. <br><br>:# Go over the below examples and see if you understand each situation.:<source>
10 + 5 * 2 # multiplication happens before addition
(10 + 5) * 2 # parentheses happen before multiplication

Navigation menu