How to make a code that would calculate a BMI in PYTHON. BMI=703 X(weight divided by height^2) Label 1 needs to say "Your BMI is:" and below that there needs to be a commentLabel that says either "You are in good shape! or if the BMI is over 25, it needs to say "You weigh too much".
name contrants are BMI_FACTOR 703, CUT OFF IS 25, GOOD_MESSAGE IS "You're in good shape!", BAD_MESSAGE IS "You weigh too much!"
variables needed are dblHeight, dblWeight, dblMessage, dblBMI.
dblWeight = eval(input("Enter weight: ")) dblHeight = eval(input("Enter height: ")) dblBMI = dblWeight * 703 / dblHeight ** 2 print("Your BMI is:", dblBMI) if dblBMI<=25: dblMessage = "You're in good shape!" else: dblMessage = "You weigh too much!" print(dblMessage)
Get Answers For Free
Most questions answered within 1 hours.