1.4 You are required to use try-except, exception handling statement in the correct position to avoid ZeroDivision Error
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
1.4 You are required to use try-except, exception handling statement in the correct position to avoid ZeroDivision Error
statement in the correct position to avoid ZeroDivision Error. Modify the following code snippet to insert the try-except statement in the correct place and print "You can't divide with 0" instead of an error. a=5 b=0 result=a/b print(result) (3 Marks)
1.4 You are required to use try-except, exception handling