CS2613/labs/L14/divisive.py

9 lines
118 B
Python
Raw Normal View History

import math
def fraction(a, b):
try:
return a / b
except ZeroDivisionError:
return math.nan