Skip to main content

Posts

Showing posts with the label basic of python

Functions in Python

In this part of the tutorial, we are going to discuss about Function in python.  Before going into it, Let’s have a quick recap to the Python Basics  we had previously completed. Learn Python from scratch by our Expert instructor  Start Now! When programming, you will encounter the calculation and logical operation you need to perform   repeatedly. One way to handle this is to write the same code over. A better solution is to write a function, function enable you to reuse the logic an infinite number of times without repeating yourself. Time to begin, Definition A function is a block of code which runs in a certain oreder   is called it by name . It can be passed data to operate on   the parameters and can return value. All data that is passed to a function is explicitly passed. Benefits of Python Function           Reuse of code           Reducing duplication of code           Decomposing complex problems into simpler pieces           Imp