Zero division error



produces a runtime error when B is equal to zero
any solns??


First things first, you can’t divide an integer or float with zero, to bypass this when B==0 you just won’t divide.
Secondly, the test cases for the solution don’t contain a zero for B, so, no need to worry.


if you are that much curious on zero division error you can go for exception handling
a = 8
b = 0
c = a / b
except ZeroDivisionError:
c = 0