Computer Science, asked by deepguri842, 6 months ago

is it possible that a function have more than one return statements

Answers

Answered by spkarajagi251106
0

Answer:

no

Explanation:

A function can only have one return statements

Answered by stranger0000
5

Answer :

Yes, it is possible for a function to have more than one return statement

Eg:

def fun(a) :

if a ==1 :

return 2

else :

return 0

a = int(input("Enter"))

R=fun(a)

print(R)

Hope it helps....

Similar questions