Introduction
Functions are named blocks of code that are
designed to do specific job. When you want to perform a particular task that
you have defined in a function, you call the name of the function responsible
for it. If you need to perform that task multiple times throughout your
program, you don’t need to type all the code for the same task again and again;
you just call the function dedicated to handling that task, and the call tells
Python to run the code inside the function. You’ll find that using functions
makes your programs easier to write, read, test, and fix errors.
It avoids repetition and makes high degree of
code reusing.
It provides better modularity for your application.
Note
Functions are nothing but a group of related
statements that perform a specific task.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.