Operators Flashcards

1
Q

What does type mean?

A

Type returns the data stored to in a variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the value of “true”?

A

1

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