Medium
Which Errors Happened?
Read lines of Python expressions until
END. Evaluate each with eval; print the result, or the name of the exception it raised.Input
Lines, then END.
Output
Lines.
Sample 1
Input
1 / 0
[1, 2][5]
int('x')
2 + 3
ENDOutput
ZeroDivisionError IndexError ValueError 5
Sample 2
Input
{}['k']
ENDOutput
KeyError
Output appears here