data types
files
Dictionaries
Functions
Other
100

what is a tuple

immutable list

100

list all access types for file we learnes

r-read

w-write

a-append

wb- write binary

rb- read binary

100

how to add to dictionary?

dictionary_name[key]=[value]

100
you can have multiple return statements T/F

F

100

in try and except what except statements did we learn

except IOError, ValueError, IndexError, and generalized error

200

what is purpose of dictionary

to assign values by keys not indexes

200

What is outfile vs infile

outfile- sends to another file on computer

infile- does in program

200

how to retrieve all keys from dictionary

dict.keys()

200

how do you call function

function_name()

200

in the random function which different ways did we incorporate the module

random.randint(lower, upper) #inclusive

random.randrange(lower, upper, step)

random.random() any #

300

how to initialize dictionary

{}

300

how to put full list into text

outfile.writelines('filename')

300

how to remove key form dictionary

dict.pop(key) or dict.popitem #last item

300

how to define a function

def function_name(any local variables):


300

set up a matrix

matrix = [

  [x,y]

  [z,a]

]

400

how to initialize list

brackets

400

What would you do to read whole document as a str vs lines as a str

__file.readlines('filename') # read lines

__file.reader('filename') # whole document

400

how to specific value out of dictionary

dict.get(key)

400

different ways we incorporated os function

os.rename('oldname', 'newname')

os.remove('filename')

400

how to write all lines in a file using an the in function

for items in 'file.csv'

  outfile.write(item)

   

500

how to initialize tuple

()

500

what would you do to read an excel file and add delimiters

__file.reader('filename', delimiter=',')
500

in dictionaries what data types can be used for keys and values

any!

500

how to print statements from function

return variable1, variable2, variable3 #inside function

obj1, obj2, ob3 = function_name() #outside function

500

how to do reverse alphabetical on a list

list.sort(reverse=True)

M
e
n
u