Python Tutorial: How to Convert a text file of binary numbers to decimal numbers

preview_player
Показать описание
An example of functional programming where I design and write a program that converts a text file full of binary numbers into a text file full of decimal numbers.

We'll use file input and output, flow charts, conversion functions and other stuff to get the job done. All of this will be done in a modular style, using functions and functional programming.

// Learn more:
Check out my complete Python play list:

// Consider supporting this channel in multiple ways
Bitcoin: 177wfkQwzXiC8o2whQMVpSyuWUs95krKYB
Dogecoin: DRK2HDp3ZkkbFpvGZnVgMVosnBhPv8r3uP
Рекомендации по теме
Комментарии
Автор

Extra credit: modify the the utility so it can also be run like bin2dec.py < bin.txt > dec.txt or like type|cat bin.txt | bin2dec.py > dec.txt Extra credit 2: support a command line flag so input can be binary, hex, or maybe even arbitrary number base!

jgurtz
Автор

Sir how to convert if the binary has float like... 10101.11100?

fdzjiwj
join shbcf.ru