fork download
  1. try:
  2. a=int(input())
  3. b=int(input())
  4. print (a+b)
  5. c=input()
  6. print(c/a)
  7. except ValueError as e:
  8. print("value error ",e)
  9. except TypeError as e:
  10. print ("type error",e)
  11. except NameError as e:
  12. print ("Name error",e)
  13. finally :
  14. print ("done ")
Success #stdin #stdout 0.02s 7332KB
stdin
3
9
Hi
stdout
12
('Name error', NameError("name 'Hi' is not defined",))
done