Chapter 1 Flashcards
Python interpreter
reads through the program and determines what each word of the program means.
Variable
Holds a value. Similar to the sto function on the Ti-84
Value
The information associated with the variable.
Ex: message = “Hello Python World”
“Hello Python World” is the value and message is the variable
String
A series of characters. Anything inside quotes is considered a string in Python. Single or double quotes work.
Method
An action that Python can perform on a piece of data.
Whitespace
any nonprinting character (space, tab, end of line symbols)
\t
tab
\n
new line
strip()
removes whitespace
Float
any number with a decimal point
str()
Allows use of numbers as a string instead of an integer
comments
everything after the # is not interpreted so it allows for comments
.append
adds item to end of a list
.insert (position, ‘name’)
adds item to list in that position
del
removes item from list
.pop
removes item from list, but it still exists