Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions coc_package/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,20 @@ 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 mul(a, b):
"""
A function that adds two integers

:param a: (int) The first integer
:param b: (int) The second integer
:return: (int) The multiplication 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