Functions are nothing but these are the number of statements which are grouped together to do some particular task in function there are two part one is function call and function definition.now the example of function :
result1 = (10,20,30) #Function call
result2 = (1,2,3)
result3 = (3.1,2,4.5)
Why we need to use are function concept in our program?
In our program we call this avg function thrice it is a small example like this avg function contains single line in the function body let us suppose it contains 100 line if we did not use function concept then we need to type the 100 line it will be very difficult job and it will take space and time instead of that we can group that statement so this function concept reduce space and time.