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
|
427 Discussions
|
Please Login in order to post a comment
T = int(input()) for i in range(T): try: a,b = input().split() a = int(a) b = int(b) c= int(a/b) print(c) except ZeroDivisionError as e: print("Error Code: integer division or modulo by zero") except ValueError as v: print("Error Code:",v)
T = int(input()) for i in range(T): try: a,b = input().split() a = int(a) b = int(b) c= int(a/b) print(c) except ZeroDivisionError as e: print("Error Code: integer division or modulo by zero") except ValueError as v: print("Error Code:",v)
n = int(input())
for _ in range(n): data = input().split() try : print(int (data[0])//int(data[1])) except ZeroDivisionError as e: print(f'Error Code: {e}') except ValueError as e: print(f'Error Code: {e}')