Sandbox:DC

From SweepMe! Wiki
Revision as of 09:44, 1 December 2017 by Felix Kaschura (talk | contribs) (Test of DC Info template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.