Question: Implement a function mystery() that takes as input a positive integer n and answers this question: How many times can n be halved (using integer
Implement a function mystery() that takes as input a positive integer n and answers this question: How many times can n be halved (using integer division) before reaching 1?
This value should be returned.
>>> mystery(4)
2
>>>mystery(11)
3
>>> mystery(25)
4
python while loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
