1. One way in which functions serve as abstraction mechanisms is by ____. a. eli
ID: 3666882 • Letter: 1
Question
1. One way in which functions serve as abstraction mechanisms is by ____. a. eliminating redundant, or repetitious, code b. assigning a name to a group of statements c. providing a docstring to help the programmer d. providing white-box functionality
2. 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
3. In a computer program, ____ can enforce a division of labor. a. modules c. functions b. literals d. algorithms
4. As functions are developed to solve each subproblem, the solution to the overall problem is gradually filled out in detail. This process is also called ____. a. top-down design c. object-oriented design b. bottom-up design d. stepwise refinement
5. ____ recursion arises when the programmer fails to specify the base case or to reduce the size of the problem in a way that terminates the recursive process. a. Looping c. Stepwise b. Limitless d. Infinite
6. For each call of a function, the PVM must allocate on the call stack a small chunk of memory called a stack ____. a. iteration c. packet b. box d. frame
7. At the top of a file-system tree is the ____. a. root directory c. stack frame b. master boot record d. path
8. On a UNIX-based file system, the path to a given file or directory in the system is a string that starts with the ____ symbol, followed by the names of the directories traversed to reach the file or directory. a. c. ~ b. / d. %
9. When ____ are introduced in a program, they are immediately given a value. a. arguments c. parameters 3 b. namespaces d. module variables
10. In Python, a ____ is the area of program text in which the name refers to a given value. a. name’s scope c. module b. namespace d. variable’s lifetime
11. In a function header, following the required arguments are one or more default or ____ arguments. a. namespace c. scope b. keyword d. lifetime
12. A(n) ____ graphics toolkit provides a simple and enjoyable way to draw pictures in a window and gives you an opportunity to run several methods with an object. a. Vector c. RGB b. Turtle d. Fractal
13. Turtle graphics were originally developed as part of the children’s programming language ____, created by Seymour Papert and his colleagues at MIT in the late 1960s. a. FORTRAN c. Logo b. Basic d. Fractal
14. The types of objects in Python are called ____. a. classes c. datums b. instances d. structures
15. The Turtle() method of the Turtle class creates a new Turtle object and opens its window. The window’s drawing area is ____. a. 50 pixels wide and 50 pixels high c. 150 pixels wide and 150 pixels high b. 100 pixels wide and 100 pixels high d. 200 pixels wide and 200 pixels high
16. 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
17. The process of creating an object is called ____. a. definition c. creation b. initialization d. instantiation
18. The RGB value of the blue color is ____. a. (0, 0, 0) c. (255, 0, 0) b. (0, 0, 255) d. (255, 255, 255)
19. The method ____ of the Image class builds and returns a new image with the same attributes as the original one, but with an empty string as the filename. a. clone c. duplicate b. copy d. instantiate
20. Resolution is measured in pixels or ____. a. DPI c. JPEG b. GIF d. PY
Explanation / Answer
1A) eliminating redundant, or repetitious, code
2A)function
3A) functions
4A)stepwise refinement
5A)Infinite
6A) frame
7A)root directory
8A) /
9A)parameters
10A)name’s scope
11A)namespace
12A)Vector
13A)Logo
14A)classes
15A)200 pixels wide and 200 pixels high
16A)API
17A)instantiation
18A)(0, 0, 255)
19A) Clone
20A)DPI
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.