编写一个bmi计算器 程序如下
def bmi_calculator(): appelation = raw_input("Mr., Mrs., Dr.") first_mame = raw_input("firstname:") last_name = raw_input("lastname:") tall = int(raw_input("heightininches")) weight = int(raw_input("weightinpounds")) inches = tall%12 feet = (tall-inches)/12 b=((weight*0.45359237)/(tall*0.0254)**2) print """ BMI Record %r %r %r , Subject is %r feet %r inches tall and weighs %r pounds. The subject's BMI is &r.
""" % (appelation,first_mame,last_name,feet,inches,weight,b)
报错如图求解释就修改。急求谢谢
% (appelation,first_mame,last_name,feet,inches,weight,b)这里是7个参数,而前面%r只有6个,应该多加一个。
温馨提示:答案为网友推荐,仅供参考