Skip to main content
1 of 2

Mini project #1: Weight Converter

The goal of this program is to convert the given weight of the user LBS or KG into the opposite of what they used ex: 180lbs will convert to kg

Weight = float(input("Enter your weight: "))
Weight_Metric = input("Type L/l for LBS and K/k for KG: ")

if Weight_Metric == "L" or Weight_Metric == "l":
    lbs_to_kg = (float(Weight * 0.453592))
    #Note that the conversion of lbs to kg might not be exact
    print(f'If you are {Weight} in pounds then you are AROUND {lbs_to_kg} in KG')
elif Weight_Metric == "K" or Weight_Metric == "k":
    kg_to_lbs = (float(Weight * 2.205))
    #Note that the conversion of kg to lbs might not be exact
    print(f"If you are {Weight} in kilograms then you are AROUND {kg_to_lbs} in LBS")

I'm very new to python and coding in general, so I'm doing mini projects that combine things I've learned and this is was my first one, and I just wanted to know if there was something that I did wrong and could ruin the entire program.