Part III: Containers
You can take this set of MCQs as many times as you like. No personal information is collected.

Dictionary values can be any data type. Suppose I create a dictionary member whose value that is a list e.g. my_dict['my_key'] = [1, 2, 3, 4]. How would I retrieve the value of the second member from the list?

*
5 points

You are writing a program that requires you to always insert new members at the beginning of a list. Which method is the best for this?

*
5 points

You have just added the fifth member of dictionary but would like to now remove it. However, you have somehow forgotten the key! Which dictionary method below will guarantee to do this?

*
5 points

You would like to create a simple phone book. Which is the best container to use for such an application?

*
5 points

You have a list containing each letter of the word ‘cat’ i.e. ['c', 'a', 't']. You multiply this list by 3. What do you get?

*
5 points

Consider a list with ten distinct integers. In playing around with our list we accidentally used a negative index e.g. -1 and are surprised to find that it works. Why?

*
5 points
Submit
Clear form
This form was created inside of Bacculus Informatix. Report Abuse