Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def func(x, y):
- try:
- return max(x, (y + x)) / (x * y + min(x, y))
- except Exception as e:
- return e
- print(func(0, 0)) # division by zero
- print(func(1, 10)) # 1.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement