LearnPy Hub
← Exceptions problems
Medium

Several Except Blocks

Read a line of numbers and an index i. Print 100 divided by the number at index i (2 decimals). Handle IndexError (bad index), ZeroDivisionError (zero) and ValueError (not a number).

Input

A line, then an index.

Output

One line.

Sample 1

Input
4 5 0
1
Output
20.00

Sample 2

Input
4 5 0
2
Output
zero
solution.py
Output appears here
Several Except Blocks · Python practice problem · LearnPy Hub