C to Python

The Harvard CS50x course is really interesting. One assignment is to create a program in C that prompts the user for a message and then outputs the text in binary with dark and light emojis representing 0 and 1, respectively. It’s fun to play around and create different “messages”. I wanted to translate my solution code from C to python, so thats what I did here. The CS50 course provides a C library, CS50, which includes some types that aren’t native to C, like string and get_string(). In my C code example below, I will omit the CS50 library so that it’s easier to compile and run without having to link the library’s binary file. ...

3 min · 571 words · Chris