Posts

Showing posts with the label Functions introductio

Python3 Functions introduction

Image
Python  Functions   Functions:        Function is a group of related statements that perform a specific task.        Functions helps us to break our program into smaller and modular chunks. As our program grows larger and larger, functions make organized and manageable.    **   It avoid repetition and makes code reusable.   Syntax::           def functi on_name(parameters):              " " "                     Doc String              " " "                Statement(s)        1. keyword "def" marks the start of function header        2. Parameters(arguments) through which we pass values to a function. These are optional        3. A colon(:) to make the end of function header        4. Doc string describe what function does. This is optional        5. "return statement to return a value from the function. This is optional How function perform :   Example:        def print_name(name):              " " "              This functio