Convert string 5'8'' to 5.677 in Python?
<p>I am trying to calculate BMI(Body Mass Index) using Python where user inputs their height and weight. The user inputs the height as 5'8" or 6" or 6'1" which should be converted into feet like 5'8" should be converted to 5.667. Here's my code so far.</p>

<pre><code>#!/usr/bin/python3.2

W = input("Enter weight:") 
H = input("Enter height:")

W = int(W)

BMI = 703*W/H**2

print(BMI)
</code></pre>

<p>My question is how I do convert those inputted 5'8" to 5.667 and do the calculation? Thanks in advance. </p>
