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.
Catching built-in exceptions
Report a typo
Sample Input 1:
45
15Sample Output 1:
3.0Sample Input 2:
16
0Sample Output 2:
Error!Write a program in Python 3
a = int(input())
b = int(input())
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.