标签: python python-3.x
运行代码时出现错误
#script to calculate the BMI of a person print ("Enter your heights in meters") height = float(raw_input()) print ("Enter your Weight in Kilograms") weight = float(raw_input()) BMI = weight/(height*height) print (BMI)
答案 0 :(得分:0)
raw_input仅存在于Python 2.x中。您应该在Python 3中使用input()。
raw_input
input()