def parhuzamos_ellenallas(xs):
s = sum(1 / x for x in xs)
return 1 / s if s != 0 else float('inf')
x0 = float(input(""))
x1 = float(input(""))
print(parhuzamos_ellenallas([x0, x1]))
Output:
def parhuzamos_ellenallas(xs):
s = sum(1 / x for x in xs)
return 1 / s if s != 0 else float('inf')
x0 = float(input(""))
x1 = float(input(""))
print(parhuzamos_ellenallas([x0, x1]))
Output: