We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Errors and Exceptions
- Exceptions
- Discussions
Exceptions
Exceptions
Sort by
recency
|
419 Discussions
|
Please Login in order to post a comment
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))
t=int(input()) for _ in range(t): try: a,b=input().split() a,b=int(a),int(b)