Q. A program having multiple function is considered better designed than a program without any function. Why?
Answer =
Because:-
(i) The program is easier to understand :-
Main block of program becomes compact as the code of functions is not part of it, thus is easier to read and understand.
(ii) Redundant code is at one place, so making changes is easier :-
Instead of writing code again when we need to use it more than once, we can write the code in the form of a function and call it more than once. If we later need to change the code, we change it in one place only. Thus it saves our time also.
(iii) Reusable functions can be put in a library in modules :-
We can store the reusable functions in the form of modules. These modules can be imported and used when needed in other programs.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )