擅长:python、mysql、java
<p><strong>编辑</p>
<p>您应该调用函数,请查看<code>Calculate</code>的更正代码</p>
<pre><code>def GetWeight():
weight = float(input("How much do you weigh in pounds?\n "))
return weight
def GetHeight():
height = input("Enter your height in inches:\n ")
return height
def Calculate():
height = GetHeight()
weight = GetWeight()
BMI = (weight * 703) / (height * height)
print ("Your BMI is", BMI)
</code></pre>