You can download this code by clicking the button below.
This code is now available for download.
Define a function that attempts to add two arguments. If the arguments are not of type int or float, it returns an error message.
Technology Stack : Exception Handling
Code Type : Function
Code Difficulty :
def aaaa(arg1, arg2):
try:
return arg1 + arg2
except TypeError:
return "Arguments must be of type int or float"