Answers for "from decimal to binary python without using any libraries"

0

from decimal to binary python without using any libraries

n=int(input("Enter a number: "))
a=[]
while(n>0):
    dig=n%2
    a.append(dig)
    n=n//2
a.reverse()
print("Binary Equivalent is: ")
for i in a:
    print(i,end=" ")
Posted by: Guest on January-23-2022

Code answers related to "from decimal to binary python without using any libraries"

Python Answers by Framework

Browse Popular Code Answers by Language