Guest User

Untitled

a guest
Jun 25th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #12a
  2. a=3
  3. if a<4:
  4. try:
  5. b=a/(a-3)
  6. print(b)
  7.  
  8. except ZeroDivisionError:
  9. print("Exception ======",ZeroDivisionError)
  10.  
  11. #12b
  12.  
  13. try:
  14. a = [1,2,3,4,5]
  15. print(a[5])
  16. except LookupError:
  17. print("Index out of bound error.")
  18. else:
  19. print("Success")
Add Comment
Please, Sign In to add comment