Chapter 1 Flashcards

1
Q

Python interpreter

A

reads through the program and determines what each word of the program means.

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

Variable

A

Holds a value. Similar to the sto function on the Ti-84

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

Value

A

The information associated with the variable.
Ex: message = “Hello Python World”
“Hello Python World” is the value and message is the variable

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

String

A

A series of characters. Anything inside quotes is considered a string in Python. Single or double quotes work.

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

Method

A

An action that Python can perform on a piece of data.

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

Whitespace

A

any nonprinting character (space, tab, end of line symbols)

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

\t

A

tab

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

\n

A

new line

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

strip()

A

removes whitespace

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

Float

A

any number with a decimal point

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

str()

A

Allows use of numbers as a string instead of an integer

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

comments

A

everything after the # is not interpreted so it allows for comments

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

.append

A

adds item to end of a list

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

.insert (position, ‘name’)

A

adds item to list in that position

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

del

A

removes item from list

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

.pop

A

removes item from list, but it still exists