A simple Python program that converts user-entered text into its binary representation. The program runs continuously until the user types exit.
- Convert any text into binary.
- Interactive command-line interface.
- Runs in a loop for multiple conversions.
- Exit anytime by typing
exit.
- Python 3.x
- Clone the repository:
git clone https://github.com/your-username/binary-text-converter.git- Navigate to the project folder:
cd binary-text-converter- Run the program:
python main.pyExample:
Enter text to convert to SVG (or 'exit' to quit): Hello
Binary representation of the text:
1001000 1100101 1101100 1101100 1101111
Exit the program:
Enter text to convert to SVG (or 'exit' to quit): exit
Exiting the program.
.
├── main.py
└── README.md
- Prompts the user to enter text.
- Converts each character into its binary ASCII representation using:
format(ord(char), 'b')- Joins all binary values with spaces.
- Prints the result.
- Repeats until the user enters
exit.
Input:
ABC
Output:
1000001 1000010 1000011
This project is open-source and available under the MIT License.