adplus-dvertising
frame-decoration

Question

What is the output of the following function?
def f(p, q):
	return p%q
f(0, 2)
f(2, 0)

a.

0
0

b.

Zero Division Error
Zero Division Error

c.

0
Zero Division Error

d.

Zero Division Error
0

Answer: (c).0
Zero Division Error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following function?