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