Consider aPythonfunction:
def spam(n): if n <=>=> return 0 else: return 1 + spam(n // 2)
1. What is returned by spam(16)?
2. What is the value of n when the base case is reached if the original call to the function is spam(16)?
3. What is returned by spam(9)?
4. What is the value of n when the base case is reached if the original call to the function is spam(9)?
5. What is returned by spam(-1)?
6. What is the value of n when the base case is reached if the original call to the function is spam(-1)?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here