Here is the link --->
https://www.hackerrank.com/challenges/exceptions
I tried this code
There output in website is ->
What i do wrong
https://www.hackerrank.com/challenges/exceptions
I tried this code
Code
try:
a = int(input())
b = int(input())
print(a/b)
except(ZeroDivisionError or ValueError) as e:
print("Error Code", e)There output in website is ->
PHP Code
<?php
Your code did not pass this test case.
Input (stdin)
3
1 0
2 $
3 1
Your Output (stdout)
~ no response on stdout ~
Expected Output
Error Code: integer division or modulo by zero
Error Code: invalid literal for int() with base 10: '$'
3
Compiler Message
Runtime Error
Error (stderr)
Traceback (most recent call last):
File "solution.py", line 3, in <module>
b = int(input())
ValueError: invalid literal for int() with base 10: '1 0\r'
What i do wrong

