pyschools Topic 3 Q 6
<p>I'm trying to solve this question:</p>

<p><a href="http://www.pyschools.com/quiz/view_question/s3-q6" rel="nofollow">http://www.pyschools.com/quiz/view_question/s3-q6</a></p>

<blockquote>
  <h2>Write a function using 'if/elif/else' conditionals to compute the BMI of a person, and return the risk associated with cardiovascular diseases.</h2>
  
  <p>BMI = weight(kg)/( height(m)*height(m) )</p>
  
  <p>BMI    Risk</p>
  
  <p>27.5 and above High Risk</p>
  
  <p>23 - 27.4   Moderate Risk</p>
  
  <p>18.5 - 22.9     Low Risk</p>
  
  <p>Below 18.5  Risk of nutritional deficiency diseases</p>
  
  <p>Examples</p>
  
  <p>HealthScreen(85, 1.75)</p>
  
  <p>'Your BMI is 27.8 (High Risk).'</p>
  
  <p>HealthScreen(68, 1.65)</p>
  
  <p>'Your BMI is 25.0 (Moderate Risk).'</p>
  
  <p>HealthScreen(60, 1.63)</p>
  
  <p>'Your BMI is 22.6 (Low Risk).'</p>
  
  <p>HealthScreen(40,1.58)</p>
  
  <p>'Your BMI is 16.0 (Risk of nutritional deficiency diseases).'</p>
</blockquote>

<p>However I fail the Private Test Cases with this code</p>

<pre><code>def HealthScreen(weight, height):
    bmi = round(weight/(float(height)*height),1)
    retv = "Your BMI is " +str(bmi)
    if bmi &gt;= 25.5:
        retv += " (High Risk)."
    elif bmi &gt;=23 and bmi &lt;=27.4:
        retv += " (Moderate Risk)."
    elif bmi &gt;= 18.5 and bmi &lt;=22.9:
        retv += " (Low Risk)."
    elif bmi &lt;18.5:
        retv += " (Risk of nutritional deficiency diseases)."
    return retv
</code></pre>

<p>I know the code isn't very pretty, but it went trough a lot of trial and error. I thought about adding code to check if either of the given numbers is zero, but still failed.</p>

<p>What am I not seeing?</p>
