Python Math Operators Flashcards

1
Q

+

A

Plus

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

-

A

Minus

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

/

A

Slash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

*

A

Asterisk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

%

A

Modulus - “X divided by Y with J remaining.” For example, “100 divided by 16 with 4 remaining.” The result of % is the J part, or the remaining part.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

<

A

Less-Than

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

>

A

Greater-Than

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

<=

A

Less-Than-Equal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

> =

A

Greater-Than-Equal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Pemdas

A

Parentheses Exponents Multiplication Division Addition Subtraction.
That’s the order Python follows as well.
The mistake people make with PEMDAS is to think this is a strict order, as in “Do P, then E, then M, then D, then A, then S.”
The actual order is you do the multiplication and division (M&D) in one step, from left to right, then you do the addition and subtraction in one step from left to right.
So, you could rewrite PEMDAS as PE(M&D)(A&S).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly