Chapter 4 Flashcards
TF
Using graphics.py allows graphics to be drawn into a Python shell window.
False
TF
Traditionally, the upper-left corner of a graphics window has coordinates (0,0).
True
TF
A single point on a graphics screen is called a pixel.
True
TF A function that creates a new instance of a class is called an accessor.
False
TF
Instance variables are used to store data inside an object.
True
TF
The statement myShape.move(10,20) moves myShape to the point (10,20).
False
TF
Aliasing occurs when two variables refer to the same object.
True
TF
The copy method is provided to make a copy of a graphics object.
False
TF
A graphics window always has the title “Graphics Window.”
False
TF
The method in the graphics library used to get a mouse click is readMouse.
False
A method that returns the value of an object’s instance variable is called a(n)
accessories
A method that changes the state of an object is called a(n)
Mutator
What graphics class would be best for drawing a square?
Rectangle
What command would set the coordinates of win to go from (0,0) in the lower-left corner to (10,10) in the upper-right?
win.setcoords(0, 0, 10, 10)
What expression would create a line from (2,3) to (4,5)?
Line(Point(2,3), Point(4,5))