Hackerss.com

hackerss
hackerss

Posted on

Python


def add(num1, num2):
    """
    Add up two integer numbers.

    Parameters
    ----------
    num1 : int
        First number to add.
    num2 : int
        Second number to add.

    Returns
    -------
    int
        The sum of ``num1`` and ``num2``.
    """

    #return the sum of the two numbers
    return num1 + num2

#example
result = add(8,15)
#output
print(result)  #23
Enter fullscreen mode Exit fullscreen mode

Top comments (0)