Wednesday, January 28, 2015

Defining Function

A function is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing.

As you may have known, Python already provide you a wide variety of built-in function such as print() and input(). But you yourself can create/define a function to use in your programs. This is called user-defined-funtion.

Source Code: example11.py
Output: Python Shell
Reference: www.tutorialspoint.com

No comments:

Post a Comment