1. If designed properly, a ____’s code captures an algorithm as a general method
ID: 3672243 • Letter: 1
Question
1. If designed properly, a ____’s code captures an algorithm as a general method for solving a class of problems. a. module c. literal b. function d. script
2. A ____ is the period of time during program execution when the variable has memory storage associated with it. a. name’s scope c. module b. namespace d. variable’s lifetime 3. Python’s ____ mechanism allows the programmer to view an interface for an entire class or an individual method, at the shell prompt. a. API c. docstring b. help d. man 4. The process of creating an object is called ____. a. definition c. creation b. initialization d. instantiation 5. Many graphics applications use ____ graphics, or the drawing of simple two-dimensional shapes, such as rectangles, triangles, and circles. a. vector c. RGB b. turtle d. fractal6. ____ are highly repetitive or recursive patterns. a. Vectors c. Euclideans b. Fractals d. Turtles 7. Resolution is measured in pixels or ____. a. DPI c. JPEG b. GIF d. PY 8. The ____ method builds and returns a string representation of an object’s state. a. self c. str b. __self__ d. __str__ 9. Python allows the programmer to ____ many of the built-in operators for use with new data types. a. overload c. recreate b. redefine d. define 10. The ____ operator returns True if self and other refer to the exact same object. a. is c. in b. equals d. eq 11. To pickle an object, you start by importing the ____ module. a. pickle c. pPickle b. pickles d. cPickle 12. Python’s ____ statement allows an exception to be caught and the program to recover. a. try-catch c. assert b. try-except d. except 13. ____ is used to describe and document the analysis and design of complex software systems. a. HTML c. XML b. SVG d. UML 14. In Python, all classes automatically extend the built-in ____ class, which is the most general class possible. a. class c. object b. base d. self 15. Code in the ____ programming style consists of input and output statements, assignment statements, and control statements for selection and iteration. a. imperative c. procedural b. object-oriented d. functional 16. The use of cooperating subprograms to solve problems is called ____ programming. a. imperative c. procedural b. object-oriented d. functional
17. In GUI-based programs, mouse-clicks are user-generated ____. a. triggers c. labels b. events d. commands
18. The ____ color of a label or an entry field is its text color. a. line c. foreground b. pen d. background 19. The ____ class includes a wide array of methods for managing items in a list box. a. Tkinter.ListBox c. Tkinter.TextBox b. Tkinter.Listbox d. Tkinter.Textbox
20. The ____ mouse event occurs when the mouse cursor has left the widget. a. c. b. d.
Explanation / Answer
1.Ans)b. function
2.Ans)b. namespace
3.Ans)c. docstring
4.Ans)d. instantiation
5.Ans)b. turtle
6.Ans)b. Fractals
7.Ans)a.a. DPI
8.Ans)d. __str__
9.Ans)d. define
10.Ans)b. equals
11.Ans)d. cPickle
12.Ans)b. try-except
13.Ans)d. UML
14.Ans)c. object
15.Ans)d. functional
16.Ans)c. procedural
17.Ans)d. commands
18.Ans)d. background
19.Ans)b. Tkinter.Listbox
20.Ans)arguments
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.