CBSE Class 12 Computer Science Question 5 of 56

Functions — Question 1

Back to all questions
1
Question

Question 1

A program having multiple functions is considered better designed than a program without any functions. Why?

Answer

A program having multiple functions is considered better designed than a program without any functions because:

  1. Program handling becomes easier: Only a small part of the program is dealt with at a time.
  2. Code reusability: A Python function can be defined once and used many times. So, it results in code reuse, we don't need to write the same code more than once.
  3. Compact code: While working with functions, a common set of code is written only once and can be called from any part of the program which reduces lines of code and programming overheads.
  4. Easy updation: If we need to update a formula or expression, changes must be made everywhere it's used, risking errors. Using functions simplifies this by making changes in only one place (which is function itself).
Get the Bright Tutorials app Stuck on a question? Ask Bright Buddy — your AI tutor — for step-by-step help in the app.