Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- gender = input()
- weight = float(input())
- height = float(input()) * 100
- age = int(input())
- activity = input()
- if gender == "m":
- formula = 66 + (weight * 13.7) + (height * 5) - (age * 6.8)
- else:
- formula = 655 + (weight * 9.6) + (height * 1.8) - (age * 4.7)
- if activity == "sedentary":
- formula *= 1.2
- elif activity == "lightly active":
- formula *= 1.375
- elif activity == "moderately active":
- formula *= 1.55
- else:
- formula *= 1.725
- print(f"To maintain your current weight you will need {math.ceil(formula)} calories per day.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement