Advertisement
BERKYT

Code for Leha

Nov 12th, 2021 (edited)
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def func(x, y):
  2.     try:
  3.         return max(x, (y + x)) / (x * y + min(x, y))
  4.     except Exception as e:
  5.         return e
  6.  
  7.  
  8. print(func(0, 0)) # division by zero
  9. print(func(1, 10)) # 1.0
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement