Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Binary Text Converter

A simple Python program that converts user-entered text into its binary representation. The program runs continuously until the user types exit.

Features

  • Convert any text into binary.
  • Interactive command-line interface.
  • Runs in a loop for multiple conversions.
  • Exit anytime by typing exit.

Requirements

  • Python 3.x

Installation

  1. Clone the repository:
git clone https://github.com/your-username/binary-text-converter.git
  1. Navigate to the project folder:
cd binary-text-converter
  1. Run the program:
python main.py

Usage

Example:

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.

Project Structure

.
├── main.py
└── README.md

How It Works

  1. Prompts the user to enter text.
  2. Converts each character into its binary ASCII representation using:
format(ord(char), 'b')
  1. Joins all binary values with spaces.
  2. Prints the result.
  3. Repeats until the user enters exit.

Example

Input:

ABC

Output:

1000001 1000010 1000011

License

This project is open-source and available under the MIT License.

Releases

Packages

Contributors

Languages