Catching built-in exceptions

Report a typo

Write a program that reads two integers, a and b, and prints the result of dividing a by b. If division by zero occurs, handle the ZeroDivisionError and print the message Error! instead.

Sample Input 1:

45
15

Sample Output 1:

3.0

Sample Input 2:

16
0

Sample Output 2:

Error!
Write a program in Python 3
a = int(input())
b = int(input())
___

Create a free account to access the full topic