Sandbox:DC

From SweepMe! Wiki
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
param1: The first summand.
param2: The second summand.
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.