Question OOP-EXC-0042
MediumWhat is the output of this code?
def g(x):
try:
r = 10 // x
except ZeroDivisionError:
return -1
else:
return r
finally:
print("done", end=" ")
print(g(0), g(5))
- A.
-1 done 2 done
- B.
-1 2
- C.
done done -1 2
- D.
done -1 done 2
Sign up free to see the answer and a step-by-step explanation.