Question 1
The main function usually expects no arguments and returns no value.Correct Answer:
TrueQuestion 2
What happens if you attempt to pop a key from a dictionary and the key does not exist, and you specified no default return?Correct Answer:
b. Question 3
A list is a sequence of data values called indexes.Correct Answer:
FalseQuestion 4
What statement accurately describes the use of a parameter in Python?Correct Answer:
a. Question 5
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?Correct Answer:
c. Question 6
What operator should you utilize if you wish to test for object identity between two objects?Correct Answer:
d. Question 7
What happens if you use the following statement to sort a list of numbers called numbers? numbers = numbers.sort()Correct Answer:
b. Question 8
When declaring a tuple, you enclose the tuple's elements in what two characters?Correct Answer:
b. Question 9
A Python dictionary is written as a sequence of key/value pairs separated by commas. These pairs are sometimes called indexes.Correct Answer:
FalseQuestion 10
What statement correctly defines what a median is?Correct Answer:
c. Question 11
In order to create a docstring for a defined function, where should the docstring be?Correct Answer:
a. Question 12
To prevent aliasing, a new object can be created and the contents of the original can be copied to it.Correct Answer:
TrueQuestion 13
In a Python dictionary, an association is formed between what two components of the dictionary? (Choose two.)Correct Answers:
c.
d. Question 14
An Identity function usually tests its argument for the presence or absence of some property.Correct Answer:
FalseQuestion 15
The index of the first item in a list is 1.Correct Answer:
FalseQuestion 16
If you use the range method with a single parameter of 50, what will be the range of integers included in the returned list?Correct Answer:
c. Question 17
You add a new key/value pair to a dictionary by using the subscript operator [].Correct Answer:
TrueQuestion 18
What dictionary method can be utilized to access the entries in a dictionary variable with a name of parts?Correct Answer:
d. Question 19
When a Python script is running as a standalone program, what will the __name__ variable be set to?Correct Answer:
a. Question 20
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.Correct Answer:
FalseQuestion 21
In computer science, what are two names that are used to describe data structures organized by association? (Choose two.)Correct Answers:
c.
d. Question 22
What list method should you use in order to remove and return the element at the end of the list named "books"?Correct Answer:
d. Question 23
Lists of integers can be built using the range function.Correct Answer:
TrueQuestion 24
Which of the following assigns a dictionary list of keys and values to the variable named persons?Correct Answer:
b. Question 25
What dictionary operation can you use to remove all the keys within the dictionary named contacts?Correct Answer:
c.