+ 1
Please is there anything wrong with this code
convert decimal to binary def convertDecToBinary(n): bin_list = [] while n > 0: m = n%2 bin_list.append(m) result = "" for e in bin_list[::-1]: result += str(e) return result print (convertDecToBinary(7))
2 Respostas
0
please can you rewrite with your correction ?
0
you are right. Thanks