uccjshrimpton

Insanity Workout Nutrition Guide

Jun 23rd, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.23 KB | None | 0 0
  1. def HBE():
  2.     Gender = input("Enter your gender (F or M):")
  3.     Weight = int(input("Enter your weight in KG:"))
  4.     Height = int(input("Enter your height in CM:"))
  5.     Age = int(input("Enter your age:"))
  6.     Result = 0
  7.  
  8.     #Changes the hard-coded values needed based on gender
  9.     if Gender.upper() == "F":
  10.         Gender = [655,4.35,4.7,4.7]
  11.     elif Gender.upper() == "M":
  12.         Gender = [66,6.23,12.7,6.8]
  13.     #Converts weight to pounds
  14.     Weight *= 2.20464
  15.     #Converts height to inches
  16.     Height *= 0.393701
  17.  
  18.     Result = (Gender[0] + (Gender[1] * Weight) + (Gender[2] * Height) + (Gender[3] * Age))
  19.     return Result
  20.  
  21. def ExerciseLevel():
  22.     ExerciseLevelHBE = HBE()
  23.     ActivityLevel = int(input("On a scale of 1-5 how active are you? (1 = not active, 5 = extremely active):"))
  24.     ActivityMultipliers = [1.2,1.375,1.55,1.7,1.9]
  25.     ExerciseLevelHBE *= ActivityMultipliers[ActivityLevel-1]
  26.     return ExerciseLevelHBE
  27.  
  28. def Goals():
  29.     ExerciseLevelHBE = ExerciseLevel()
  30.     Goals = input("Do you want to...\n1)Lose weight\n2)Maintain weight\n3)Gain weight")
  31.     if Goals == "1":
  32.         ExerciseLevelHBE -= 500
  33.     elif Goals == "3":
  34.         ExerciseLevelHBE += 300
  35.     return ExerciseLevelHBE
  36.  
  37. print(Goals())
Advertisement
Add Comment
Please, Sign In to add comment