Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Athokshay Ashok
Hermitian-Technologies
Commits
d82039ac
Unverified
Commit
d82039ac
authored
Jun 13, 2020
by
aryamanpandya
Committed by
GitHub
Jun 13, 2020
Browse files
Update MealSuggestion.py
parent
8632d8d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
AI Fitness/MealSuggestion.py
View file @
d82039ac
...
...
@@ -3,22 +3,32 @@ import mysql.connector as mysql
#Calculates caloric and macronutrient intake levels based on user information
#and dependent on the user's goals
def
suggestedIntake
(
weight
,
BMR
,
goal
,
ECB
):
caloricOutput
=
BMR
+
ECB
if
goal
==
0
:
caloricIntake
=
0.85
*
caloricOutput
elif
goal
==
1
:
caloricIntake
=
caloricOutput
elif
goal
==
2
:
elif
goal
==
2
:
caloricIntake
=
1.15
*
caloricOutput
proteinCalories
=
0.18
*
caloricIntake
protein
=
proteinCalories
/
4
carbCalories
=
0.55
*
caloricIntake
carbs
=
carbCalories
/
4
fatCalories
=
0.27
*
caloricIntake
fat
=
fatCalories
/
5
proteinCalories
=
0.18
*
caloricIntake
protein
=
proteinCalories
/
4
carbCalories
=
0.55
*
caloricIntake
carbs
=
carbCalories
/
4
fatCalories
=
0.27
*
caloricIntake
fat
=
fatCalories
/
5
optimalLevels
=
[
caloricIntake
,
protein
,
carbs
,
fat
]
#List of intake data
#calories followed by macronutrients in grams
return
optimalLevels
#uses values calculated from above function + allergy data
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment