Skip to content

HopeTechDev/Practice-Python-wiith-Me-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 

Repository files navigation

๐Ÿ‹๏ธ Practice-Python-w-Me (Weight Unit Calculator)


๐Ÿ‘จโ€๐ŸŽ“ As an engineering student, I love going to the gym to stay healthy and fit while balancing my studies.

๐Ÿ’ก So, I thought of creating a program about it โ€” to practice and study Python at the same time!

โš–๏ธ This program helps me quickly convert weight between kilograms and pounds and gives me a simple health check.

๐Ÿ“ Note: This is for my personal use, and the numbers used (like the ideal weight) are based on my own chosen limits for what I consider my max โ€œbad weight" (according to my BMI).


๐Ÿš€ Features

  • Convert Kilograms โ†” Pounds easily
  • Get a simple health check based on my personal weight limits
  • Practice project to improve my Python coding skills

๐Ÿ’ป Code

weight = float(input("Enter your weight: "))
unit = input("Input K for kilograms or L for pounds: ")
upper = unit.upper()
LbsToKg = weight * 0.4535
KgToLbs = weight * 2.204


if upper == "K":
    result_1 = KgToLbs
    print(str(round(result_1, 2)) + " lbs")
    
    if result_1 >= 170:
        print("Your weight is above the healthy range. Consider exercising and maintaining a balanced diet.")
    elif result_1 < 170:
        print("Great! Your weight is within a healthy range. Keep it up!")
        
elif upper == "L":
    result_2 = LbsToKg
    print(str(round(result_2, 2)) + " Kg")
    
    if result_2 >= 76:
        print("Your weight is above the healthy range. Consider exercising and maintaining a balanced diet.")
    elif result_2 < 76:
        print("Great! Your weight is within a healthy range. Keep it up!")

I'll soon upload the jupyter notebook file after I play around with my code some more and add additional features to it.


๐Ÿ’ช โ€œStronger today than yesterday.โ€


About

Weight Unit Calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published