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 |
No comments:
Post a Comment