try and except in the python

technical talkiess
0

 print("Enter number one")

num1 = input()
print("Enter number one")
num2 = input()

# try except use remaing program run and not show exception ...... if the check any condtion then use the try and catch

try:
    print("Sum of thr number is ",int(num1) + int(num2))
except Exception as e:
    print(e)

print("Remaing program is run")
Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)