Python Lecture 4
Python Lecture 4
User-defined functions: those that are written by the user and allows a programmer
to break a problem into pieces (modules) that can be reused.
The modular programming helps a programmer focus on one part of a larger problem
at a time. As a result, writing functions is often an important part of developing larger
pieces of software.
Use-defined Functions can have inputs, called parameters, and they can return values
as outputs. In Python, you define a function using the def keyword.
User-defined Function