Decimal to binary May 03, 2022 Get link Facebook X Pinterest Email Other Apps stk=[]def push(ele): stk.append(ele)def bin(t): if t==1: return push(1) return push(t%2),bin(t//2)no=int(input("Enter the number: "))bin(no)stk=stk[::-1]for i in stk: print(i,end='') Comments
Comments
Post a Comment