Inputs and Exceptions

Report a typo

Let's say you run the code below and enter different inputs. Match the integers you input with the results of the program.

a = int(input('Print the integer here! '))
b = 100
d = a / b

if d > 0:
    print(d)
elif d == 0:
    raise Exception('The result is 0!')
else:
    raise Exception('Oops!')
Match the items from left and right columns
0
100
-9
3
1
0.03
Exception: Oops!
Exception: The result is 0!
___

Create a free account to access the full topic