title: Floating point calculations and control flow
body: <p>Here is part of my code:</p>
  
  <pre><code>students = 0
  weight = 0
  height = 0
  
  while students &lt; 5:
      name = input("Please enter the name. ")
      students = students + 1
  
  while weight == 0:
      try:
          weight = float(input("Please enter the weight in kgs "))
  
          if weight &lt;= 0:
              print ("Please enter a number greater than zero ")
              weight = 0
              continue
  
      except ValueError:
          print ("No number found, please enter a number greater than zero ")
          weight = 0
          continue
  
  while height == 0:
      try:
          height = float(input("Please enter the height in metres "))
  
  
          if height &lt;= 0:
              print ("Please enter a number greater than zero ")
              height = 0
              continue
  
      except ValueError:
          print ("No number found, please enter a number greater than zero ")
          height = 0
          continue
  
  BMI = (weight/(height*height))
  print (name, "has the BMI of", "%.2f" %BMI)
  if BMI &lt; 18.5:
      print ("The student is underweight.")
  elif 18.5 &lt;= BMI &lt;= 27:
      print ("The student is a healthy weight.")
  elif BMI &gt; 27:
      print ("The student is overweight.")
  
  weight = 0
  height = 0
  </code></pre>
  
  <p>However, when the BMI is 18.5 it says that the student is underweight and when the BMI is 27 it says the student is overweight, when both should actually be a healthy weight?
  e.g. 53.456 for weight and 1.7m for height shows up as underweight</p>