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
When replacing an element in a list, the subscript is used to reference the target of the assignment statement, which is not the list but an element's position within it.
(True/False)
4.7/5
(34)
If you use the range method with a single parameter of 50, what will be the range of integers included in the returned list?
(Multiple Choice)
5.0/5
(36)
An Identity function usually tests its argument for the presence or absence of some property.
(True/False)
4.8/5
(36)
What dictionary method can be utilized to access the entries in a dictionary variable with a name of parts?
(Multiple Choice)
4.7/5
(40)
What happens if you attempt to pop a key from a dictionary and the key does not exist, and you specified no default return?
(Multiple Choice)
4.9/5
(36)
What are the two arguments expected by the get method for a dictionary object? (Choose two.)
(Multiple Choice)
4.9/5
(37)
In order to create a docstring for a defined function, where should the docstring be?
(Multiple Choice)
4.7/5
(33)
The definition of the main function and the other function definitions can appear in no particular order in the script, as long as main is called at the very end of the script.
(True/False)
4.9/5
(33)
Although a list's elements are always ordered by position, it is possible to impose a natural ordering on them as well.
(True/False)
4.8/5
(34)
Each item in a list has a unique index that specifies its position.
(True/False)
4.7/5
(33)
Which of the following assigns a dictionary list of keys and values to the variable named persons?
(Multiple Choice)
4.8/5
(37)
In scripts that include the definitions of several cooperating functions, it is often useful to define a special function named init that serves as the entry point for the script.
(True/False)
4.9/5
(35)
The list method ascending mutates a list by arranging its elements in ascending order.
(True/False)
4.9/5
(40)
When a Python script is running as a standalone program, what will the __name__ variable be set to?
(Multiple Choice)
4.9/5
(38)
To prevent aliasing, a new object can be created and the contents of the original can be copied to it.
(True/False)
4.9/5
(27)
In a Python dictionary, an association is formed between what two components of the dictionary? (Choose two.)
(Multiple Choice)
4.8/5
(39)
What happens if you use the following statement to sort a list of numbers called numbers? numbers = numbers.sort()
(Multiple Choice)
4.8/5
(40)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)