Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- name = input("Please enter name or press 0 to quit:")
- if name == "0":
- break
- def h():
- height = int(input("Please enter height in inches: "))
- return height
- def w():
- weight = int(input("Please enter weight in pounds: "))
- return weight
- def bmi(height, weight):
- total = float((weight * 703)/(height * height))
- return total
- def printbmi(name):
- print(name + "'s BMI Profile")
- height = h()
- print("Height:", str(height), "inches")
- weight = w()
- print("Weight:", str(weight), "lbs")
- print("BMI Index:" + str(float(round(bmi(height, weight), 1))))
- def main(name):
- printbmi(name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement