The items dictionary method returns an The items dictionary method returns an Answer: sequence of tuples
Which of the following is not a dictionary method? Which of the following is not a dictionary method? Answer: sort
What keyword parameter is used to send a key-function to the sort method? What keyword parameter is used to send a key-function to the sort method? Answer: key
Which of the following expressions correctly tests if x is even? Which of the following expressions correctly tests if x is even? Answer: x
Which of the following is not a characteristic of a Python list? Which of the following is not a characteristic of a Python list? Answer: it is immutable
Which of the following is not a Python list method Which of the following is not a Python list method Answer: get
The method that adds a single item to the end of a list is The method that adds a single item to the end of a list is Answer: append
Which of the following is not a built-in sequence operation in Python Which of the following is not a built-in sequence operation in Python Answer: repetition
In a Button widget, what is the data type of the instance variable active? In a Button widget, what is the data type of the instance variable active? Answer: bool
A Python string literal can span multiple lines if enclosed with A Python string literal can span multiple lines if enclosed with Answer: """
The term applied to hiding details inside class definitions is The term applied to hiding details inside class definitions is Answer: encapsulation
A Python convention for defining methods that are "private" to a class is to begin the method name with A Python convention for defining methods that are "private" to a class is to begin the method name with Answer: an underscore(_)
Within a method definition, the instance variable x could be accessed via which expression? Within a method definition, the instance variable x could be accessed via which expression? Answer: self.x
A method definition is similar to a(n) A method definition is similar to a(n) Answer: function definition
A method definition with four formal parameters is generally called with how many actual parameters? A method definition with four formal parameters is generally called with how many actual parameters? Answer: five
What Python reserved word starts a class definition? What Python reserved word starts a class definition? Answer: class
The easiest place in a system structure to start unit-testing is The easiest place in a system structure to start unit-testing is Answer: the bottom
How is a percent sign indicated in a string formatting template? How is a percent sign indicated in a string formatting template? Answer: %
In the racquetball simulation, what data type is returned by the gameOver function? In the racquetball simulation, what data type is returned by the gameOver function? Answer: bool