Q Consider following Python function that uses recursion:
def check(n):
if n <= 1:
return True
elif n % 2 == 0 :
return check(n/2)
else:
return check(n/1)
What is the value returned by check(8)?
Answer =
Value returned by check(8) is ‘True’.
Value returned by check(8) is ‘True’.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )