My project is an online BMI calculator. BMI or Body-Mass Index gives a numerical value by tallying
the height and weight of an adult. Introduced by Adolphe Quetelet during the 19 th century, BMI
helps to correlate risk of health problems with certain measurements of a person. So, take the test
now to see what your BMI is!
limit=int(input('How many people would like to undergo this test?'))
for i in range(limit):
name=input('Enter your name:')
name=name.upper()
print('Hi', name, '\nWelcome to this online health test! \nThis is a test to check your \'BMI[Body-Mass Index]\' which gives you a value derived from your height and weight.')
print('\n\nINSTRUCTIONS\n________________________________________________________\nYou will be asked to enter certain details. Please fill it in accordingly and your health status will be provided.\n__________________________________________________________________\n')
age=int(input('\nPlease enter your age'))
if age<=20:
print('\nYou are still in your growing stage. As such, you can be exempted from this test \nHere are some reccommendations for you to grow healthy\n\n1. Have a balanced meal \n2. Incorporate more protein into your diet.This can speed up your recovery process.\n3. Have calcium rich food. This can help your bones grow strong. \n4. Go out in the morning Sun to get Vitamin-D \n5. Do some stretching exercises everyday. This helps with your growth process. \n6. Maintain the correct posture. Stooping all the time can hamper your growth process. \n7. Do some exercise to keep fit. \n8. Say no to some screen time. You need a good vision to see all what you are blessed with. \n9. Get 8-10 hours of sleep. This helps with your brain development.')
if age>20:
height=float(input('Please enter your height in metres'))
weight=float(input('Please enter your weight in kilograms'))
h= height*height
BMI = weight/h
if BMI>=18.5 and BMI<=24.9:
print('\n\nYour BMI is', BMI, '\nYou have a healthy BMI. We hope you continue a healthy lifestyle. \nIn order to maintain this BMI of yours, please make sure: \n->you exercise \nhave a healthy diet \nStay hydrated')
elif BMI<18.5:
print('\n\nYour BMI is',BMI,'\nYour BMI suggests you are\nUNDERWEIGHT\n')
q1= input('\nDo you often feel full after a small meal?[Enter YES/NO]')
q1=q1.upper()
if q1=='YES':
print('\nFeeling full after a small meal is usual in such cases.\n->In addition to your large meals, incorporate other small meals to your diet. \n-> Choose nutrient-rich food\n-> Add extra calories to your meal\n-> Exercise according to your abilities. It can increase your appetite')
elif q1=='NO':
print("\nThat's a good sign! However, ensure you continue including more carb-rich meals in your daily diet.(KEEP A COUNT OF YOUR CARBS EVERYDAY)")
q2= input('\nDo you exercise?[Enter YES/NO]')
q2=q2.upper()
if q2=='NO':
print('\nTry exercising more. It can increase your appetite and help you eat more')
elif q2=='YES':
print("\nThat's great! Exercising can help you with increasing your appetite.")
elif BMI>24.9:
if BMI>24.9 and BMI<=29.9:
BMIstatus= 'OVERWEIGHT'
if BMI>30:
BMIstatus= 'OBESE'
print('\n\nYour BMI is',BMI,'\nYour BMI suggests you are\n', BMIstatus)
food_list1=[]
q3= input('\nDo you include veggies and fruits in your diet?')
q3=q3.upper()
if q3=='YES':
food_list1.append('Fruits & Vegetables')
print('')
else:
print('')
q4= input('Do you include pulses in your diet?')
q4=q4.upper()
if q4=='YES':
food_list1.append('Pulses')
print('')
else:
print('')
q5= input('Do you consume fried or oily food items often?')
q5=q5.upper()
if q5=='YES':
food_list1.append('Fried & Oily Foods')
print('')
else:
print('')
q6= input('Do you have too much sweets?')
q6=q6.upper()
if q6=='YES':
food_list1.append('Sweets')
print('')
else:
print('')
q7= input('Do you drink a lot of fizzy drinks?')
q7= q7.upper()
if q7=='YES':
food_list1.append('Fizzy Drinks')
print('')
else:
print('')
print('\n_______________________________________________________\n')
food1= 'Fried & Oily Foods' in food_list1
food2= 'Sweets' in food_list1
food3= 'Fizzy Drinks' in food_list1
food4= 'Fruits & Vegetables' in food_list1
food5= 'Pulses' in food_list1
if food1==True or food2==True or food3==True:
print('___________________________________________________________\n',food_list1)
print('The above displayed is a rough model of your daily diet.\nDo keep in mind the consumption of unhealthy food items like fries, sweets and fizzy drinks can all make you obese.\n_____________________________________________________________________\nDo not worry! We have solutions for you!\n________________________________________________________________________________________\nTry cutting junk food from your diet. It may be tempting to lay your hands on them but gradually you will be able to withdraw from consuming such food. \nYou may also try contacting a dietician for further advice. However it is advised not to try online diets without guidance as it may have take an adverse toll on your health')
else:
print('____________________________________________________________\n',food_list1)
print('This is a rough model of your daily diet')
print('\nSo, your food habits seems fine. Please do continue the same. Keep a check on the amount of junk food you take in and limit it. A healthy diet will surely help you in your path to weight loss.')
q8= input('\nDo you exercise often?[YES/NO]')
q8=q8.upper()
if q8=='YES':
print("\nThat's great! This means you are on the right path for your weight loss.")
elif q8=='NO':
print('\nPlease do exercise regularly! Exercising is vital for getting rid of all the fat accumulated in your body.\nStart with short workouts and then move to advanced workouts. You can also frequent a nearby gym if open and workout for a minimum of 30 mins.')
print('')
print('__________________________________________________________')
print('As the famous saying goes-\n\'HEALTH IS WEALTH\'\nA healthy body is important to lead a healthy life. And we believe you can surely lead one.\nWe extend our full support in this healthy journey. We believe in you!\nThank you for availing this service')