Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. One way in which functions serve as abstraction mechanisms is by ____. a. eli

ID: 3667135 • 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

Below are the correct options answered in the same sequence of question given(in brackets)

1. One way in which functions serve as abstraction mechanisms is by -->> (a. eliminating redundant, or repetitious, code )

2. If designed properly, a ____’s code captures an algorithm as a general method for solving a class of problems -->> (b. function)

3. In a computer program, ____ can enforce a division of labor -->> (c. functions)

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____. -->> (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. -->>( 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____ . -->> (d. Frame)

7. At the top of a file-system tree is the ____. -->> (a. root directory)

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. --> (b. / - forward slash)

9. When ____ are introduced in a program, they are immediately given a value. -->> (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 )

11. In a function header, following the required arguments are one or more default or ____ arguments. -->>( a. namespace )

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. -->>( b. Turtle )

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. -->> ( b. Logo )

14. The types of objects in Python are called ____. -->> (a. classes )

15. The Turtle() method of the Turtle class creates a new Turtle object and opens its window. The window’s drawing area is ____. -->> ( b. 100 pixels wide and 100 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. -->> ( c. docstring )

17. The process of creating an object is called ____. -->> ( d. instantiation )

18. The RGB value of the blue color is ____. -->> ( b. (0, 0, 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 )

20. Resolution is measured in pixels or ____. -->> (a. DPI )