Operators Flashcards
1
Q
What does type mean?
A
Type returns the data stored to in a variable.
2
Q
Finish this string so the output is I love string concatenation! a = "I love" b = ??? c = ??? print(c)
A
b = " string concatenation!" c = a + b
3
Q
How do you always get a whole number when dividing in python?
A
Using floor division. Floor division does not round up, nor round down. It removes the decimal value from the answer.
Ex) a. a = 5 b = 2 print(a // b) 2
4
Q
What is the value of “true”?
A
1