Skip to content

spirinamayya/ArgParse

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

ArgParse

https://docs.python.org/3/library/argparse.html

https://docs.python.org/3/howto/argparse.html

Write python script using argpars module

Testing healthy lifestyle index:

  1. Write your name [optional];
  2. Choose your gender: male, female [optional, choices];
  3. Write your height (cm);
  4. Write your weight (kg);
  5. How much do you usually sleep? Less than 7 hours; 7-8 hours (1 point); More than 8 hours;
  6. How many meals does your daily diet include? 1 meal, 2-3 meals, 4-5 meals (1 point);
  7. How many fresh fruits and vegetables do you eat during the day? I do not eat these products regularly, Less than 500 grams, More than 500 grams (1 point);
  8. How many steps do you walk on average per day? Less than 5 thousand steps, 5-10 thousand steps, More than 10 thousand steps (1 point);
  9. Do you monitor your health? Not; Yes, I have been undergoing medical examination in the last 3 years (1 point), Yes, but I do not see a doctor;
  10. What is your mood today? Good (1 point), Neutral, Bad [choices];
  11. When was the last time you had a state of happiness? During the week (1 point), During the month (1 point), During the year.
  12. BMI (Body Mass Index) is calculated: BMI = body weight / height * height. BMI from 18.5 to 24.9 corresponds to 1 point.

The maximum value of the healthy lifestyle index: 8 units. Depending on the result your python script should print out a message:

8 points Your index of a healthy lifestyle is 8/8, which means that you are a true leader in a healthy lifestyle! [5-7] points Your health index is [5-7]/8, which means that you are on the right track! [0-4] points Your healthy lifestyle index is [0-4]/8 🤢, you need to rethink your healthy lifestyle!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%