summaryrefslogtreecommitdiff
path: root/progs/a396.py
blob: 0d03f17302b6bbbeac82aa8649ec1851fbe5d239 (plain)
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