hw01.py
''' 
Soren DeOrlow 
IDSN 599, Fall 2021 
deorlow@usc.edu 
Homework 1 
 
'''

while True:

    # request name of individual whose BMI will be calculated
    personName = input("What is the name of the person whose BMI I will be calculating? ")
    print("Hi, what's " + personName + "'s height in feet & inches?")

    # request for individual's height in feet
    FeetComponentOfHeight = input("Let's start with " + personName.title() + "'s height in feet: ")
    # convert to integer
    FeetComponentOfHeight = int(FeetComponentOfHeight)

    # request for individual's height in inches
    inchesComponentOfHeight = input("What's " + personName.title() + "'s height in inches? ")
    # convert to integer
    inchesComponentOfHeight = int(inchesComponentOfHeight)

    # request for individual's weight in pounds
    weightInPounds = input("What's " + personName.title() + "'s weight in pounds? ")
    # convert to integer
    weightInPounds = int(weightInPounds)

    # convert individual's total height in inches
    totalInchesHeight = float((FeetComponentOfHeight * 12) + inchesComponentOfHeight)
    # print(personInchesHeight) "It worked!"

    # convert individual's total height into meters
    totalMeterHeight = float(totalInchesHeight / 39.3701)
    # print(personMeterHeight) "It worked!"

    # convert individual's total weight in lbs into kilos
    weightInKilos = float(weightInPounds / 2.20462)
    # print(personKiloWeight) "It worked!"

    # Individual's height in meters squared by multiplying the variable by itself
    squareMeterHeight = float(totalMeterHeight * totalMeterHeight)
    # print(squareMeterHeight) "It worked!"

    results = ""
    # the individual's BMI is calculated by dividing weight by height squared
    personBmi = float(weightInKilos / squareMeterHeight)

    # BMI is rounded up to the closest decimal point
    personBmi = round(personBmi, 1)

    # Present individual's BMI
    print(personName.title() + "'s BMI is:")
    print(personBmi)

    # Evaluate BMI for normal, overweight and underweight (I added this as a bonus)

    if personBmi < 19:
        print("This BMI indicates " + personName.title() + " is underweight.")
    elif personBmi >= 19 and personBmi <= 25:
        print("This BMI indicates a normal weight.")
    elif personBmi >= 25 and personBmi <= 30:
        print("This BMI indicates " + personName.title() + " is overweight.")
    elif personBmi > 30:
        print("This BMI indicates " + personName.title() + " is obese.")

    # Begin next individual
    print("")