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
Close
Hashes for code-20220213-pinakpanigogoi-pinak47-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17491dc234f87338b40e9ab7c19fea3f7939aa6b7ce2fb24f1770de749ad33fd |
|
MD5 | 36888dcb531ae470ed47bc32a1ec27a1 |
|
BLAKE2b-256 | be90ccb50b13ff7eed929088183f4c5b056e597b40f9645e0fc487112840d88d |
Close
Hashes for code_20220213_pinakpanigogoi_pinak47-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e82d1ea03c5b3e64ae769eb7df326595cd9234a3e0ea0d754b8071776ec524b4 |
|
MD5 | 0093b41b540bf687745ce3cc70e05de5 |
|
BLAKE2b-256 | 0e03ed71d8cea511114744dafc96c5f5a3f99370d54be44bc41549dbf55614ad |