Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.24 KB

File metadata and controls

58 lines (41 loc) · 1.24 KB

⚖️ Python Weight Converter (CLI)

A simple command-line weight converter built using Python.
This project converts between different weight units using clean logic and colored output.


⚙️Versions

  • Version 1→ Basic functions/if-elif/Error handling/No Loop
  • Version 2→ dictionaries/Looped/Improved CLI/ Better error handling and input validation

🚀 Features

  • 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

🛠️ Requirements

  • Python 3.x
  • colorama

Install dependency:

  •  pip install colorama
    

🧠 What I Learned

  • 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

⚠️ Limitations

  • Limited unit support
  • No GUI

📌 Project Level

Beginner / Novice


⭐ This project is part of my Python learning journey.💙💙