A simple command-line number system converter written in Python.
Converts between Binary, Decimal, Octal, and Hexadecimal.
โจ Features:
- Binary โ Decimal / Octal / Hex
- Decimal โ Binary / Octal / Hex
- Octal โ Binary / Decimal / Hex
- Hex โ Binary / Decimal / Octal
- Beginner-friendly code, split into 2 files (
main.py+conversions.py) - Small pauses (
time.sleep) for a smooth terminal experience ๐
number-converter/
โโโ main.py # Menu + user input + program loop
โโโ conversions.py # All conversion functions
โโโ README.md # This file
- Clone this repo:
git clone https://github.com/<your-username>/number-converter.git cd number-converter
- Run the program:
python main.py
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Welcome to Number System Converter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Binary to other number system conversion
2. Decimal To other number system conversion
3. Octal to other number system conversion
4. Hexadecimal to other number system conversion
5. Exit
Enter your choice: 1
Binary to Decimal Conversion
Enter a binary number: 1010
Decimal value: 10
This was made as a beginner Python project to practice:
- Functions
- Modules & imports
- Loops and menus
- Handling different number systems
Itโs simple, raw, and just works โ Beginner Pranav styleโข ๐ช
MIT License (feel free to use/modify).