Python Programming: An Introduction to Computer Science, 3rd Ed.
Python Programming: An Introduction to Computer Science, 3rd Ed.
3rd Edition
ISBN: 9781590282755
Author: John Zelle
Publisher: Franklin, Beedle & Associates
Expert Solution & Answer
Book Icon
Chapter 6, Problem 1D

Explanation of Solution

The two motivations for defining functions in your programs are: 

  • Reusability
  • Abstraction

The first motivation is reusability:

  • Once defined, a function can be used over and over and over again.
  • User can save your work by invoking the same function many times in the program.
  • Another aspect of reusability is that a single function can be used in several different and separate programs.
  • When a user needs to write a new program, user can go back to your old programs, find the functions he/she needs, and reuse those functions in his/her new program.
  • User can also reuse functions that somebody else has written...

Blurred answer
Students have asked these similar questions
Of the five primary components of an information system (hardware, software, data, people, process), which do you think is the most important to the success of a business organization? Part A - Define each primary component of the information system. Part B - Include your perspective on why your selection is most important. Part C - Provide an example from your personal experience to support your answer.
Management Information Systems
Q2/find the transfer function C/R for the system shown in the figure Re ད
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning