python新手简单程序出错求修改急求

编写一个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个,应该多加一个。
温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网