Advertisement
Guest User

bmi

a guest
Jan 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. # read height in meters and weight in kg
  2. # convert read to float
  3. # calculate bmi value
  4. # write result
  5.  
  6. height = float(input("How tall are you? \n"))
  7. weight = float(input("How much do you weigh in kg? \n"))
  8. bmi = (weight / (height * height))
  9.  
  10. print ("With the input height and weight, your bmi value is:", bmi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement