- Does the following code throw a
ZeroDivisionError
?
def foo():
return 1/0
- Does the following code throw a
ZeroDivisionError
?
def const(x):
return 1
print(const(1/0))
- What does this print?
def foo(x, y):
return x/y
x = 5
y = 2
print(foo(y, x))