Exam 5: Lists and Dictionaries
Exam 1: Introduction50 Questions
Exam 2: Software Development Data Types and Expressions50 Questions
Exam 3: Loops and Selection Statements50 Questions
Exam 4: Strings and Text Files50 Questions
Exam 5: Lists and Dictionaries50 Questions
Exam 6: Design With Functions50 Questions
Exam 7: Simple Graphics and Image Processing50 Questions
Exam 8: Graphical User Interrfaces50 Questions
Exam 9: Design With Classes50 Questions
Exam 10: Multithreading Networks and Client Server Programming50 Questions
Exam 11: Searching Sorting and Complexity Analysis51 Questions
Select questions type
What list method should you use in order to remove and return the element at the end of the list named "books"?
Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
B
You add a new key/value pair to a dictionary by using the subscript operator [].
Free
(True/False)
4.8/5
(40)
Correct Answer:
True
You are designing a script that may be imported as a module in other scripts. What variable can you use to check whether the script has been imported as a module, or is running as the main script?
Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
B
The main function usually expects no arguments and returns no value.
(True/False)
4.8/5
(38)
You are creating a Python script that will make use of user input contact names and their associated phone numbers. What would be ideal for storing and accessing these associated values?
(Multiple Choice)
4.8/5
(32)
What is the return value for a function that has no return statement defined?
(Multiple Choice)
4.8/5
(40)
What statement accurately describes what a mutator is in the Python language?
(Multiple Choice)
4.8/5
(40)
In computer science, what are two names that are used to describe data structures organized by association? (Choose two.)
(Multiple Choice)
4.7/5
(29)
What statement accurately describes the use of a parameter in Python?
(Multiple Choice)
4.9/5
(37)
Anytime you foresee using a list whose structure will not change, you can, and should, use a tuple instead.
(True/False)
4.8/5
(36)
If pop is used with just one argument and this key is absent from the dictionary, Python raises an error.
(True/False)
4.9/5
(32)
When creating a list of items whose structure will not change, what should you ideally use to contain the values?
(Multiple Choice)
4.9/5
(36)
What operator should you utilize if you wish to test for object identity between two objects?
(Multiple Choice)
4.9/5
(37)
What statement accurately describes the difference between a list and a tuple?
(Multiple Choice)
4.9/5
(38)
What dictionary operation can you use to remove all the keys within the dictionary named contacts?
(Multiple Choice)
4.9/5
(43)
The == operator returns True if the variables are aliases for the same object. Unfortunately, == returns False if the contents of two different objects are the same.
(True/False)
4.9/5
(36)
What method should you utilize to add the elements of list2 onto the end of list1?
(Multiple Choice)
4.9/5
(36)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)