For this Question: Given a number N, you have to perform only two types of operations on the number:-
1) If N is odd increase it by 1
2) If N is even divide it by 2

Your task is to find the number of operations it takes to make N equal to 1.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>MakeOne()</b> that takes integer N as argument.

Constraints:-
1 <= N <= 100000Return the number of operations it takes to make the number N equal to 1.Sample Input:-
7

Sample Output:-
4

Explanation:-
7 - > 8 - > 4 - > 2 - > 1

Sample Input:-
3

Sample Output:-
3, I have written this Solution Code: def MakeOne(N):
    cnt=0
    while N!=1:
        if N%2==1:
            N=N+1
        else:
            N=N//2
        cnt=cnt+1
    return cnt
, In this Programming Language: Python, Now tell me if this Code is compilable or not?