1 2 3 4 5 6 7 8 9 10
def decimal_To_Binary(N): B_Number = 0 cnt = 0 while (N != 0): rem = N % 2 c = pow(10,cnt) B_Number += rem*c N //= 2 cnt += 1 return B_Number