Operators/Symbols Flashcards
(10 cards)
1
Q
1+2+3+4
A
Addition
2
Q
10-1
A
Subtraction
3
Q
2*3
A
Multiplication
4
Q
16/4
A
Division
5
Q
10%3
A
Modulus
(Calculates Remainder)
6
Q
2**3
A
Exponential
(Find the power of something of something)
7
Q
10//3
A
Floor division operator
(Divides, discarding remainder;
ex: 3)
8
Q
+
A
Concatenation (adds values on either side of the operator)
“Hello” + “World”
9
Q
*
A
Repetition
“Hello”*2
10
Q
1) []
2) [ : ]
A
1) Slice (Gives character from given index)
“Hello”[0] will give H
2) Range Slice (Gives characters from given range)
“Hello”[0:4] will give Hell