Home | | Computer Science 12th Std | Python Functions

Chapter: 12th Computer Science : Chapter 7 : Core Python : Python Functions

Python Functions

Functions are named blocks of code that are designed to do specific job.

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.

Main advantages of functions are

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.

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
12th Computer Science : Chapter 7 : Core Python : Python Functions : Python Functions |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.