height = float(input("身高(米):"))
weight = float(input("体重(公斤):"))
bmi = weight / (height**2)
print("你的BMI指数是:%.2f" % bmi)
结果运行图:
height = float(input("身高(米):"))
weight = float(input("体重(公斤):"))
bmi = weight / (height**2)
print("你的BMI指数是:%.2f" % bmi)
结果运行图: