You can download this code by clicking the button below.
This code is now available for download.
Calculate the quotient of two numbers, if the second number is 0, return infinity
Technology Stack : Exception handling, division operation
Code Type : Function
Code Difficulty : Intermediate
def aordiff(arg1, arg2):
try:
return arg1 / arg2
except ZeroDivisionError:
return float('inf')