January 2019
Beginner
318 pages
8h 23m
English
A function is a set of statements that perform a specific task. Using functions helps in breaking our program into smaller parts. Programs will be more organized if we use functions as it avoids repetition and makes code reusable. Look at the following syntax:
def function_name(parameters): statement(s)
Refer to the following example:
def welcome(name): print("Hello " + name + ", Welcome to Python Programming !")welcome("John")Output:Hello John, Welcome to Python Programming !
Read now
Unlock full access