A small example package
Project description
BMI calculation
The following are the objective,
-
Calculate the BMI (Body Mass Index) using Formula 1, BMI Category and Health risk from Input data (person_detail.json) of the person and add them as 3 new columns.
Formula 1 - BMI BMI(kg/m2) = mass(kg) / height(m)2
-
Count the total number of overweight people using ranges in the column BMI Category.
BMI Category------------BMI Range (kg/m2)------------Health risk Underweight------------ 18.4 and below ------------Malnutrition risk Normal weight------------ 18.5 - 24.9------------------Low risk Overweight---------------- 25 - 29.9 ----------------Enhanced risk Moderately obese---------- 30 - 34.9 ---------------- Medium risk Severely obese ----------- 35 - 39.9 ---------------- High risk Very severely obese ---- 40 and above ---------------Very high risk
There are few major functions used in the whole program,
- 'fitness_calc.py' (in 'src' directory) has the functions to calculate BMI, Categorization and the count of Overweight persons.
- 'utility.py' is created to make functions generic. It has the file handling functions.
- 'test.py' has the function to unit test the code.
- 'main.py' is used to get the desired output from the input data.
- 'person_detail.json' has the input data containing persons' Gender, Height and Weight.
- 'Final_BMI_Results.csv' will give the desired out in .csv format.
- 'setup.py' has the required package details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file code-20220213-pinakpani-pinak47-0.0.1.tar.gz
.
File metadata
- Download URL: code-20220213-pinakpani-pinak47-0.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96c725b982badc4870e3ecc45cb08e1dfa743dbedd075c850e78283feedd0ef0 |
|
MD5 | 13803f3a3fcffc2695c6cd40660c6478 |
|
BLAKE2b-256 | 7511d9bd1c3f6b21fd6789208f719b048c0d870506cfb4e772e55cf62f594295 |
File details
Details for the file code_20220213_pinakpani_pinak47-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: code_20220213_pinakpani_pinak47-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90d4d93c6cb00dec9b6fe2962a0886838a7472d6969848a28b71579552487ece |
|
MD5 | b70c13066f0cd7e41cc929211c3ce1d4 |
|
BLAKE2b-256 | 234a8f6f7b216d0fbb91ea0ac612e0bb2f475c3a45ce5ab7bc9f4faaf5f2f867 |