pycharm said it not right | SoloLearn: Learn to code for FREE!

0

pycharm said it not right

try: print(1 / 0) except ZeroDivisionError: raise ValueError

5/15/2020 2:56:28 AM

GUANLIANG Shi

1 Answer

New Answer

0

you are raising an exception to handle a previous one. what is the point of raise ValueError? you could instead, print("You can not divide by zero")