Exam 6: Objects and Their Use
Exam 1: Introduction102 Questions
Exam 2: Data and Expressions71 Questions
Exam 3: Control Structures129 Questions
Exam 4: Lists85 Questions
Exam 5: Functions83 Questions
Exam 6: Objects and Their Use54 Questions
Exam 7: Modular Design62 Questions
Exam 8: Text Files58 Questions
Exam 9: Dictionaries and Sets33 Questions
Exam 10: Object-Oriented Programming81 Questions
Exam 11: Recursion27 Questions
Select questions type
Build in function _______ can be used in Python to determine if two variables reference the same object in memory.
(Short Answer)
4.9/5
(30)
When a turtle is moved to a new position using the setposition method, a line is drawn from its current location to the new location if the turtle is set to be shown (by use of the showturtle method.)
(True/False)
4.8/5
(36)
Suppose that list1 is assigned to a list of tuples. Given the proper code so that a complete copy of list1 is assigned to variable list2.
(Short Answer)
4.8/5
(30)
In Python, an object has certain attributes and behaviors, implemented as
(Multiple Choice)
4.9/5
(30)
Which of the following returns the reference to the "default" turtle created as a result of a call to the setup method?
(Multiple Choice)
4.9/5
(33)
After the following series of assignments are performed,
List1 = [1, 2, 3, 4]
List2 = list1
List1 = [5, 6, 7, 8]
(Multiple Choice)
4.9/5
(27)
Give Python code to create a square of size 100 x 100 such that its bottom left corner is positioned at screen location (0, 0). Use relative positioning to do this. (Assume that the turtle screen has been set up, and that there is a turtle named the_turtle to make use of.)
(Essay)
4.9/5
(32)
Garbage collection it a process that automatically determines what parts of memory can be deallocated during the execution of a program.
(True/False)
4.7/5
(42)
Python provides a list contructor that can be used to create a deep copy of a list.
(True/False)
4.8/5
(38)
An object contains a set of __________________ and a set of ____________.
(Short Answer)
4.9/5
(32)
The instruction to set the position of a turtle object to the center of the screen is __________________.
(Short Answer)
4.8/5
(46)
After the following series of assignments are performed,
List1 = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
List2 = list(list1)
List2[0][0] = 10
(Multiple Choice)
4.8/5
(45)
When one variable is assigned to another, it is the dereferenced value that is assigned, not the reference value.
(True/False)
4.8/5
(41)
For a turtle screen size of 600 x 800, the coordinates of the top left corner are (-300, 400).
(True/False)
4.8/5
(41)
Two objects of the same type store the same set of values, but are represented by instance variables with different identifiers (names) in each.
(True/False)
4.9/5
(43)
Suppose that list1 and list2 each reference the same list object in memory. Give a set of instruction that would cause the original list reference to be automatically garbage collected.
(Short Answer)
4.8/5
(28)
Showing 21 - 40 of 54
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)