Skip to content

Instantly share code, notes, and snippets.

@eeshangarg
Created August 18, 2020 23:56
Show Gist options
  • Save eeshangarg/16be1a28f1f7e6d34769295582ecc993 to your computer and use it in GitHub Desktop.
Save eeshangarg/16be1a28f1f7e6d34769295582ecc993 to your computer and use it in GitHub Desktop.
calories.py
AGE = 22
WEIGHT = 59.87 # kg
HEIGHT = 170 # cm
BMR = 10 * WEIGHT + 6.25 * HEIGHT - 5 * AGE + 5
print("BMR: ", BMR)
ACTIVITY_MULTIPLIER = 1.3 # Sedentary + Training
MAINTENANCE = BMR * ACTIVITY_MULTIPLIER
SURPLUS = 0.15 # 15%
CALORIE_GOAL = SURPLUS * MAINTENANCE + MAINTENANCE
print("Maintenance: ", MAINTENANCE)
print("Calorie goal: ", CALORIE_GOAL)
LEAN_BODY_MASS = 119.50 # lbs
PROTEIN = LEAN_BODY_MASS * 1.5
FAT = (0.25 * CALORIE_GOAL) / 9
CARBS = (CALORIE_GOAL - (PROTEIN * 4) - (FAT * 9)) / 4
print("\nMacros:")
print("Calories: ", round(PROTEIN * 4 + CARBS * 4 + FAT * 9))
print("Protein (g):", round(PROTEIN))
print("Fats (g):", round(FAT))
print("Carbs (g):", round(CARBS))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment