A simple command-line weight converter built using Python.
This project converts between different weight units using clean logic and colored output.
- Version 1→ Basic functions/if-elif/Error handling/No Loop
- Version 2→ dictionaries/Looped/Improved CLI/ Better error handling and input validation
- Convert between:
- Kilograms (kg)
- Grams (g)
- Pounds (lb)
- Metric tonne (t)
- Milligram (mg)
- uses basse unit (kg) for accurate conversions
- Colored terminal output using colorama
- input validation and error handling
- Repeat conversions without restarting
- Python 3.x
- colorama
Install dependency:
-
pip install colorama
- Writing and using Functions (def)
- Handling Input validation
- Conditional logic(if-elif)
- Error handling with try-except
- CLI UI improvement using colors
- Looping
- Using dictionaries for cleaner conversion logic
- Limited unit support
- No GUI
📌 Project Level
Beginner / Novice