| 
 | 
back to boardWhat's wrong with my code!!!!!!!!!!!!!!!! Posted by  A_human 11 Sep 2015 14:15   n=1 x=[] while(n<=10):     j=int(input())     if j==0:         break     else:         n+=1         x.append(j) def fun(k):     if k==0:         return 0     if k==1:         return 1     if (k%2==0):         return fun(k//2)     if not(k%2==0):         return (fun(k//2)+fun(k//2+1)) for l in range(0,len(x)):     if x[l]%2==0:         print(fun(x[l]-1))     if not(x[l]%2)==0:         print(fun(x[l]))  |  
  | 
|