introduction to functions function is block of organized and reusable program code that performs specificsingleand well-defined task function provides an interface for communication in terms of how information is transferred to it and how results are generated need for functions simplifies program development by making it easy to test separate functions understanding programs becomes easier libraries contain several functions which can be used in our programs to increase the productivity by dividing large program into smaller functionsdifferent programmers can work on different functions users can create their own functions and use them in various locations in the main program there are two types of functionsbuilt-in-functions user defined functions built-in functionspython interpreter has number of functions that are available for use they are called as bulit-in functions eginput(),print(),range(),abs(),len(),type(),sum(),sorted(),etc user defined functions defining functions function definition consists of function header that identifies the functionfollowed by the body of the function the body of function contains the code that is to be executed when function is called to define functionwe have to remember following pointsfunction definition starts with the keyword def the keyword def is followed by the function name and parentheses after parenthesesa colon (:should be placed parameters or arguments that the function accepts should be placed inside the parentheses function might have return statement bv prasanthi dept of cse page