+ 2
In py try/except if any error comes in try will it go to except???
try: num1 = 7 num2 = 7 print num1 / num2) print("Done calculation") except ZeroDivisionError: print("An error occurred") print("due to zero division") y am I getting syntax error as per explanation it should go to except
2 Answers
+ 1
Syntax error --> missing parenthesis in print (num1/num2)
0
You did not write the pharenthesis at num1/num2