Feb-10-2019, 10:25 AM
Hello, I have a problem. So I made a formula that calculates a User's BMI based on their height and weight, and gave it the variable userBmi. I would like it that if userBMI is between two floats, it prints a specific message, e.g. "You're Healthy" / "You're Overweight"
PS: UserEth stands for the user's ethnicity, and a certain ethnicity determines whether the same BMI can be classified as UnderWeight or OverWeight for different ethnicity
userBmi = round(weight / (height * height), 2) break except ValueError: print("Incorrect, Try again") if userEth == "European": if userBmi < underWeight: print("Your BMI is", userBmi) print(under_msg) if userEth == "European": if userBmi < 18.5 && > 24.9: print("You're healthy")This is just a snippet of the code I'm making, and the issue is the last 3 lines. It yields a syntax error, I don't know if I'm implementing the functions code or what, but any help you guys can give will be really appreciated.
PS: UserEth stands for the user's ethnicity, and a certain ethnicity determines whether the same BMI can be classified as UnderWeight or OverWeight for different ethnicity