Computer Science, asked by selvacsk958, 9 months ago

Choose the most important benefits of writing your own function *

Answers

Answered by ridahussain86
2

Although, sadly, Python does not have such a built in function, it does have the next best thing – a way for us to create our own functions. Creating our own function to carry out a particular job has many benefits. It allows us to reuse the same code many times within a program without having to copy it out each time.Using function increase readability of a program. A big code is always difficult to read. Breaking the code in smaller Functions keeps the program organized, easy to understand and makes it reusable. The length of a source program can be reduced by using functions at appropriate places.User-defined functions help to decompose a large program into small segments which makes program easy to understand, maintain and debug. If repeated code occurs in a program. Function can be used to include those codes and execute when needed by calling that function.Functions are "self contained" modules of code that accomplish a specific task. Functions usually "take in" data, process it, and "return" a result. Once a function is written, it can be used over and over and over again. Functions can be "called" from the inside of other functions.

Similar questions