Python Operators Flashcards
1
Q
Python Order of Operations
A
PEMDAS
Parentheses Exponents Multiplication Division Addition Subtraction
2
Q
Addition
A
+
5 + 2 = 7
3
Q
Subtraction
A
-
5 - 2 = 3
4
Q
Multiplication
A
*
2 * 3 = 6
5
Q
Division
A
/
6 / 3 = 2
6
Q
Modular division (Remainder)
A
%
5 % 2 = 1
7
Q
Exponential
A
**
5 ** 2 = 25
8
Q
Floor division
A
//
5 // 2 = 2
9
Q
The assignment operator
A
=
10
Q
Add and reassign.
A
+=
11
Q
Subtract and reassign.
A
-=
12
Q
Multiply and reassign.
A
*=
13
Q
Divide and reassign
A
/=
14
Q
Modular division and reassign
A
%=
15
Q
Floor division and reassign.
A
//=