You are required to use try-except, exception handling statementin the correct position to avoid ZeroDivisionError. Modify thefollowing code snippet to insert the try-except statement in thecorrect place and print “You can’t divide with 0” instead of anerror.
a=5b=0result=a/bprint(result)
You are required to use try-except, exception handling statement in the correct position to avoid ZeroDivisionError. Mod
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am