Operators Flashcards

1
Q

+

A

addition

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

-

A

subtraction

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

*

A

multiplication

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

**

A

power of

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

/

A

division

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

//

A

floor division

2 // 4.0 == 0.0

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

%

A

string interpolate or modulus

2 % 4 == 2

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

<

A

less than

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

>

A

greater than

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

<=

A

less than equal

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

> =

A

greater than equal

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

==

A

equal

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

!=

A

not equal

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

<>

A

not equal

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

( )

A

paren

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

[ ]

A

list brackets

17
Q

{ }

A

dict curly braces

{ ‘x’: 5, ‘y’: 10 }

18
Q

@

A

at (decorators

@classmethod

19
Q

=

A

assign equal

20
Q

;

A

semi colon

print “hi”; print “there”

21
Q

+=

A

add and assign

x = 1; x += 2

22
Q

-=

A

subtract and assign

x = 1; x -= 2

23
Q

*=

A

multiply and assign

x = 1; x *= 2

24
Q

/=

A

divide and assign

x = 1; x /= 2

25
Q

//=

A

floor divide and assign

x = 1; x //= 2

26
Q

%=

A

modulus assign

x = 1; x %= 2

27
Q

**=

A

power assign

x = 1; x **= 2