Course 2: Python for Data Science, AI & Development Flashcards
1
Q
Types
A
how python represents different types of data
2
Q
what does bool(1) yield?
A
TRUE
3
Q
what does bool(0) yield?
A
FALSE
4
Q
expressions
A
type of operation the computers perform
5
Q
what does a double slash (//) in a division operation do?
A
rounds to nearest whole number
6
Q
variable
A
used to store values
7
Q
how to assign a new valuable to existing variable
A
use : instead of =
8
Q
what does int(true) yield?
A
1
9
Q
if name=”Michael Jackson”, what does name[2] return?
A
“c”
10
Q
if name=”Michael Jackson”, what does name[0:4] return?
A
“Mich”
11
Q
if name=”Michael Jackson”, what does name[::2] return?
A
“McalJcsn”
12
Q
if name=”Michael Jackson”, what does name[0:5:2] return?
A
“Mca”
13
Q
\n
A
new line
14
Q
\t
A
tab
15
Q
\
A
\