GitHub

decimal_a_binario.py

# Calculando un numero decimal a binario ej => 34 : 2 = 17 (sobran 0 decimales) => 17 : 2 = 8 (sobra 1 decimal) => 8 : 2 = 4 (sobran 0 decimales) => 4 : 2 = 2 (sobran 0 decimales) 2 : 2 = 1 (sobran 0 ...
#to find the binary number, we divide the number by 2 to find the remaider. the remainder gives us a 1 or 0. we then repeat the process till number = 0 #setting loopTimes = to the length of the string ...