DreamSource
Thursday, May 2, 2024
BCA PART B 7. Demonstrate Exceptions in Python
a=
int
(
input
(
'Enter value of a: '
))
b=
int
(
input
(
'Enter value of b: '
))
try
:
print
(
'a/b='
,a/b)
except
ZeroDivisionError:
print
(
"Sorry, Zero in the denominator."
)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment