Skip to content

Latest commit

 

History

History
61 lines (51 loc) · 2.27 KB

File metadata and controls

61 lines (51 loc) · 2.27 KB

Unit Converter 🔄 (Length, Mass, Time)

Overview

The Unit Converter is a Streamlit-based web application that allows users to easily convert between different Length, Mass, and Time units. Built with Python, Streamlit, and Pint, this app provides accurate and efficient unit conversions with a simple and user-friendly interface.

Features

✅ Convert between Length, Mass, and Time units effortlessly
✅ Supports various units such as meters, kilometers, grams, pounds, seconds, hours, etc.
✅ User-friendly interface with dropdown selections for input and output units
✅ Handles errors gracefully for invalid conversions
✅ Built-in custom styling for an enhanced user experience

Technologies Used

  • Python 🐍
  • Streamlit (for the web interface)
  • Pint (for unit conversion)

Installation & Setup

  1. Clone the repository
    git clone https://github.com/yourusername/unit-converter.git
    cd unit-converter
  2. Create a virtual environment (optional but recommended)
    python -m venv env
    source env/bin/activate  # For macOS/Linux
    env\Scripts\activate  # For Windows
  3. Install dependencies
    pip install -r requirements.txt
  4. Run the app
    streamlit run app.py

Usage

  1. Open the Unit Converter web app.
  2. Select a conversion category (Length, Mass, or Time).
  3. Enter the value and choose the "From" and "To" units.
  4. Click to get the converted value instantly!

Supported Units

📏 Length: Meter, Kilometer, Centimeter, Millimeter, Micrometer, Nanometer, Mile, Yard, Foot, Inch
⚖️ Mass: Kilogram, Gram, Milligram, Microgram, Ton, Pound, Ounce
Time: Second, Minute, Hour, Day, Week, Year

Example Conversions

🔹 10 kilometers = 6.2137 miles
🔹 500 grams = 1.1023 pounds
🔹 3600 seconds = 1 hour

License

This project is open-source under the MIT License.

Contact & Contributions

📧 Have suggestions? Want to contribute? Feel free to fork the repo, submit pull requests, or contact me at adnanshaikh84482@gmail.com.

🚀 Happy Converting! 🎉