diff --git a/coc_package/add.py b/coc_package/add.py index 1a32662..be3b95f 100644 --- a/coc_package/add.py +++ b/coc_package/add.py @@ -10,3 +10,16 @@ def add(a, b): if not isinstance(a, int) or not isinstance(b, int): raise AttributeError("This function only accepts integer arguments") return a + b + + def subtract(a, b): + """ + A function that adds subtracts integers + + :param a: (int) The first integer + :param b: (int) The second integer + :return: (int) The sum of a and b + :raises: AttributeError, if a and b are not integers + """ + if not isinstance(a, int) or not isinstance(b, int): + raise AttributeError("This function only accepts integer arguments") + return a - b