Feb-08-2019, 12:02 PM
I see an indentation error there. You have to be careful with the indentations.
Try this solution
Try this solution
while True: try: height = float(input("Input your height in meters: ")) weight = float(input("Input your weight in kilogram: ")) userBmi = round(weight / (height * height), 2) print("User BMI: {}".format(userBmi)) break except ValueError: print("Incorrect, Try again")