Exam 6: Objects and Their Use

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

The instruction to get the reference to the "default" turtle in turtle graphics is __________________.

Free
(Short Answer)
5.0/5
(37)
Correct Answer:
Verified

turtle.getturtle()

The instruction to create a new turtle object is ____________________________.

Free
(Short Answer)
4.8/5
(40)
Correct Answer:
Verified

turtle.Turtle()

A location in the turtle graphics window is indicated by an x and y coordinate value relative to the center of the screen in inches.

Free
(True/False)
4.9/5
(39)
Correct Answer:
Verified

False

Match the following: -selection

(Multiple Choice)
4.8/5
(42)

The use of turtle graphics in Python requires that the turtle module be imported.

(True/False)
4.9/5
(34)

A list in Python contains a collection of values, in which each value is an object, but the list itself is not an object.

(True/False)
4.9/5
(33)

What would the result of the turtle.setup(400, 500) be in turtle graphics?

(Multiple Choice)
4.9/5
(43)

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 absolute 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
(39)

All values in Python are represented as objects.

(True/False)
4.8/5
(36)

Two objects of the same type have the same set of methods.

(True/False)
5.0/5
(36)

A list in Python is a collection of objects (values), but the list itself is not an object.

(True/False)
4.8/5
(29)

Suppose that variable k is assigned to a list object that contains a method called numZeros that returns the number of 0 values in the list. Give the proper syntax for calling method numZeros on variable k.

(Short Answer)
4.8/5
(43)

Which of the following is NOT an example of relative positioning?

(Multiple Choice)
4.8/5
(37)

When one variable is assigned to another variable referencing a list, a second copy of the list is automatically created.

(True/False)
4.8/5
(35)

The dot operator is used to select a member of an object.

(True/False)
4.8/5
(40)

The instruction to determine the current position of a turtle object is __________________.

(Short Answer)
4.8/5
(39)

There may be more than on name associated with a given object stored in memory.

(True/False)
4.7/5
(45)

Match the following: -behavior

(Multiple Choice)
4.8/5
(33)

To deallocate a memory location is to mark it as "no longer needed" so that the executing program does not attempt to use it.

(True/False)
4.9/5
(33)

Objects consist of three fundamental parts: a set of attributes, a set of non-value returning functions called methods, and a set of value-returning functions.

(True/False)
4.8/5
(34)
Showing 1 - 20 of 54
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)