Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def HBE():
- Gender = input("Enter your gender (F or M):")
- Weight = int(input("Enter your weight in KG:"))
- Height = int(input("Enter your height in CM:"))
- Age = int(input("Enter your age:"))
- Result = 0
- #Changes the hard-coded values needed based on gender
- if Gender.upper() == "F":
- Gender = [655,4.35,4.7,4.7]
- elif Gender.upper() == "M":
- Gender = [66,6.23,12.7,6.8]
- #Converts weight to pounds
- Weight *= 2.20464
- #Converts height to inches
- Height *= 0.393701
- Result = (Gender[0] + (Gender[1] * Weight) + (Gender[2] * Height) + (Gender[3] * Age))
- return Result
- def ExerciseLevel():
- ExerciseLevelHBE = HBE()
- ActivityLevel = int(input("On a scale of 1-5 how active are you? (1 = not active, 5 = extremely active):"))
- ActivityMultipliers = [1.2,1.375,1.55,1.7,1.9]
- ExerciseLevelHBE *= ActivityMultipliers[ActivityLevel-1]
- return ExerciseLevelHBE
- def Goals():
- ExerciseLevelHBE = ExerciseLevel()
- Goals = input("Do you want to...\n1)Lose weight\n2)Maintain weight\n3)Gain weight")
- if Goals == "1":
- ExerciseLevelHBE -= 500
- elif Goals == "3":
- ExerciseLevelHBE += 300
- return ExerciseLevelHBE
- print(Goals())
Advertisement
Add Comment
Please, Sign In to add comment