https://github.com/corado-bogos/weight_conversion_program
A simple Python console program that converts weight between kilograms and pounds. The user inputs a value, selects the unit, and gets the converted result. Demonstrates if/elif, user input handling, and type conversion. Personal and educational use only — see LICENSE.md.
https://github.com/corado-bogos/weight_conversion_program
beginner cli console converter learning python weight
Last synced: about 1 month ago
JSON representation
A simple Python console program that converts weight between kilograms and pounds. The user inputs a value, selects the unit, and gets the converted result. Demonstrates if/elif, user input handling, and type conversion. Personal and educational use only — see LICENSE.md.
- Host: GitHub
- URL: https://github.com/corado-bogos/weight_conversion_program
- Owner: corado-bogos
- License: other
- Created: 2026-05-02T15:31:46.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-07-02T12:01:33.000Z (about 1 month ago)
- Last Synced: 2026-07-02T14:04:24.907Z (about 1 month ago)
- Topics: beginner, cli, console, converter, learning, python, weight
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Weight Conversion Program
A beginner-friendly Python console program that converts weight between **kilograms (kg)** and **pounds (lbs)**.


---
## What it does
- Asks for a weight value and the unit (`k` for kg, `p` for lbs)
- Converts to the other unit using `1 kg = 2.205 lbs`
- Prints the result rounded to 2 decimals
- Handles an invalid unit choice gracefully
---
## Run it
Requires **Python 3** (no external packages).
```bash
python3 weight_conversion_program.py
```
---
## Example
```
Enter your weight: 70
Kilograms or Pounds (k/p): k
Your weight is: 154.35 Lbs.
```
---
## What I practiced
- Reading and converting user input (`float`, `input`)
- Conditional logic (`if` / `elif` / `else`)
- Basic arithmetic and `round()`
- Structuring a small Python script
---
## License
Personal and educational use only. See [LICENSE.md](LICENSE.md).