Magzter Gold (Sitewide CA)
Raspberry Pi Coding & Projects The Complete Manual (Digital)

Raspberry Pi Coding & Projects The Complete Manual (Digital)

1 Issue, Issue 3

Also available on
Zinio Unlimited logo
1-month free trial

Get unlimited access to this article, this issue, + back issues & 5,000+ other magazines.

Renews at just $8.99/month after trial.

Cancel anytime.
Learn more

Text to Binary Convertor

While it may not seem too exciting, this text to binary convertor is actually quite good fun. It also only uses two lines of code, so it’s extremely easy to insert into your own script.
Text to Binary Convertor
TXT2BIN.PY Naturally we’re using the format function to convert the user’s entered text string into its binary equivalent. If you want to check its accuracy, you can plug the binary into an online convertor. 1000010 1101001 1101110 1100001 1110010 1111001 The text to binary convertor does offer some room for improvement and enhancement. There are many uses: it could be utilised in a password or secret word script, as part of an adventure game or just a novel way to display someone’s name. With regards to improvements, you could display the binary conversion in a Pygame window, using the animated text options from page 100. You could also ask the user if they wanted to have another go, or even ask if they wanted the binary output to be saved…
You're reading a preview of
Raspberry Pi Coding & Projects The Complete Manual (Digital) - 1 Issue, Issue 3

DiscountMags is a licensed distributor (not a publisher) of the above content and Publication through Zinio LLC. Accordingly, we have no editorial control over the Publications. Any opinions, advice, statements, services, offers or other information or content expressed or made available by third parties, including those made in Publications offered on our website, are those of the respective author(s) or publisher(s) and not of DiscountMags. DiscountMags does not guarantee the accuracy, completeness, truthfulness, or usefulness of all or any portion of any publication or any services or offers made by third parties, nor will we be liable for any loss or damage caused by your reliance on information contained in any Publication, or your use of services offered, or your acceptance of any offers made through the Service or the Publications. For content removal requests, please contact Zinio.

© 1999 – 2025 DiscountMags.com All rights reserved.