Sandbox:DC
Jump to navigation
Jump to search
Objective | This function shall add two values and therefore simplify one of the most complex arithmetic operations. | ||||
Function Definition | def add(self,param1,param2):
sum = param1 + param2
return sum
| ||||
Parameters |
| ||||
Return value | The sum of the two arguments. | ||||
When is function called | Whenever the program flow detects that a sum is required, this function is called. There is one exception: When the second argument is negative, sub() is called instead. | ||||
Comments | Actually, this whole function is not used in production. |