Python
Python
Prerna S. Mhatre
To let a function return a value , use the return. Python achieved with the return statem
ent.
Python also has the ability to return multiple values from a function call.
Example:-
def my_function(x):
return 5*x
print(my_function(3))
Output:
15
Incremental Development
If the code is bigger, then we have to spend the maximum time to debug it. To simplify
this task of dealing with large code we can use a new development process called incre
mental development.
Development step:
1. Write pseudocode line by line on how logic works
2. Write code line by line in python
3. Run program and validate code works with dummy data
4. Repeat steps 2-3 until your function works as anticipated.
Composition