Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. while True:
  2. name = input("Please enter name or press 0 to quit:")
  3. if name == "0":
  4. break
  5. def h():
  6. height = int(input("Please enter height in inches: "))
  7. return height
  8.  
  9. def w():
  10. weight = int(input("Please enter weight in pounds: "))
  11. return weight
  12.  
  13. def bmi(height, weight):
  14. total = float((weight * 703)/(height * height))
  15. return total
  16.  
  17. def printbmi(name):
  18. print(name + "'s BMI Profile")
  19. height = h()
  20. print("Height:", str(height), "inches")
  21. weight = w()
  22. print("Weight:", str(weight), "lbs")
  23. print("BMI Index:" + str(float(round(bmi(height, weight), 1))))
  24.  
  25. def main(name):
  26. printbmi(name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement