def main():
decimal=int(input('pleas enter a binary sequence: '))
number=binaryConvert(decimal)
print("Contert to decimal: ", number)
def binaryConvert(decimal):
if decimal == 0 :
return '0'
elif decimal==1:
return '1'
number=''
while decimal == '1' and decimal == '0' :
number=str(decimal%2)+ number
number=number
main()
but i did work well with me
so could u fix or find where is my mistake