You are viewing a single comment's thread. Return to all comments →
def expFunc(in_arg1,in_arg2): try: return int(in_arg1)//int(in_arg2) except ZeroDivisionError as e: return (f"Error Code: {e}") except ValueError as v: return (f"Error Code: {v}")
n=int(input()) for i in range(n): a, b =input().split() print(expFunc(a,b))
Seems like cookies are disabled on this browser, please enable them to open this website
Exceptions
You are viewing a single comment's thread. Return to all comments →
def expFunc(in_arg1,in_arg2): try: return int(in_arg1)//int(in_arg2) except ZeroDivisionError as e: return (f"Error Code: {e}") except ValueError as v: return (f"Error Code: {v}")
n=int(input()) for i in range(n): a, b =input().split() print(expFunc(a,b))