SCRIPTING-AND-PROGRAMMING-FOUNDATIONS practice question 13 of 25
What is an advantage of using a programming library?
Full set: 137 questionsProgramming libraries consist of pre-written, pre-tested code for common tasks. By using a library, a programmer can leverage this existing functionality instead of writing it from scratch. This practice, known as software reuse, significantly reduces development time and effort, thereby improving the programmer's overall productivity. It allows developers to focus on the unique logic of their application rather than re-implementing common components like mathematical calculations or network requests.
B. Visualizing static program elements is a function of an Integrated Development Environment (IDE) or a specific visualization tool, not an inherent advantage of a library.
C. Libraries are designed to abstract complexity and reduce the amount of code a programmer needs to write in their main function, not increase it.
D. Programs must be run (executed) for libraries to perform their functions. Static analysis tools can yield results without running, but this is unrelated to libraries.
1. Guttag, J. V. (2016). Introduction to Computation and Programming Using Python, With Application to Understanding Data. MIT Press. Chapter 4, "Functions, Scoping, and Abstraction," discusses how functions and modules (libraries) allow for abstraction and reuse, which enhances productivity.
2. MIT OpenCourseWare. (2016). 6.0001 Introduction to Computer Science and Programming in Python. Lecture 4: Functions. The lecture explains that functions and modules (which are collected into libraries) allow programmers to reuse code without rewriting it, saving time.
3. Sommerville, I. (2011). Software Engineering (9th ed.). Pearson. Chapter 16, "Software Reuse," explains that reuse via libraries and components leads to "accelerated development" and "increased productivity" (Section 16.1.2).
Keep practicing
Take the free SCRIPTING-AND-PROGRAMMING-FOUNDATIONS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other SCRIPTING-AND-PROGRAMMING-FOUNDATIONS practice questions
- Question 1Which characteristic distinguishes a markup language from other languages?
- Question 2A program calculates the average miles per gallon given miles traveled and gas consumed H…
- Question 5Which characteristic specifically describes an object-oriented language?
- Question 6Which is one characteristic of an object-oriented language that is not a characteristic o…
- Question 7Which operation should be used to check if the difference of two values is greater than 1?
- Question 9A program allows the user to play a game. At the end of each game, the program asks the u…
