-
Notifications
You must be signed in to change notification settings - Fork 181
/
healthScore.py
27 lines (25 loc) · 916 Bytes
/
healthScore.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Health Calculator
# func to show health score of user
def healthScore():
print(' ')
numberOfFruits = int(input('Number Of Fruits You Eat in Week : '))
numberOftimesFastFood = int(input('Number of Times You Eat FastFood in a Week : '))
cigars = int(input('Cigars You Smoke In A Week : '))
workoutTime = int(input('How Much minutes You Workout EveryDay : '))
bodyMassIndex = int(input('Whats Your BodyMassIndex(BMI) : '))
if 18 < bodyMassIndex < 26 :
print(' ')
healthScore = (numberOfFruits + workoutTime + bodyMassIndex ) - (cigars + numberOftimesFastFood)
print(healthScore)
else :
print(' ')
healthScore = (numberOfFruits + workoutTime) - (cigars + numberOftimesFastFood + bodyMassIndex )
print(healthScore)
# main code
while True:
startOrEnd = str(input('Start or End : '))
if startOrEnd == 'Start':
print(healthScore())
continue
else :
quit()