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