A library for calculating body index include: [BMI, BMR, TDEE, WHR, LBM, BFP, NW, IBW, MA]
Project description
C_healthy
C_healthy là thư viện Python để tính toán các chỉ số sức khỏe (BMI, BMR, TDEE, ...)
Cách cài đặt
pip install C_healthy
Cách sử dụng
from C_healthy import BMI, BMR, TDEE, WHR, LBM, BFP, NW, IBW, MA
bmi = BMI(70, 1.75)
bmr = BMR("nam", 60, 1.75, 18)
tdee = TDEE("nam", 60, 1.75, 18, 3)
lbm = LBM("nam", 70, 1.75)
bfp = BFP("nam", 70, 1.75, 20)
ibw = IBW("nam", 1.75)
whr = WHR("nam", 85, 95)
nw = NW(60)
ma = MA("nam", 70, 1.7, 18)
print("BMI:", bmi)
print("BMR:", bmr)
print("TDEE:", tdee)
print("LBM:", lbm)
print("BFP:", bfp)
print("WHR:", whr)
print("IBW:", ibw)
print("NW:", nw)
print("MA:", ma)
Hoặc có thể dùng cho nhiều người bằng đoạn oop sau
import sys
from C_healthy import BMI, BMR, TDEE, WHR, LBM, BFP, NW, IBW, MA
#sys.stdin = open('TASK.inp', 'r') # Đọc dữ liệu từ TASK.inp
#sys.stdout = open('TASK.out', 'w') # Ghi dữ liệu ra TASK.out
class BodyIndex:
def __init__(self, gioi_tinh, chieu_cao, can_nang, tuoi, chi_so_R, vong_eo, vong_hong):
self.gioi_tinh = gioi_tinh
self.chieu_cao = chieu_cao
self.can_nang = can_nang
self.tuoi = tuoi
self.chi_so_R = chi_so_R
self.vong_eo = vong_eo
self.vong_hong = vong_hong
def hien_thi_ket_qua(self):
print(BMI(self.can_nang, self.chieu_cao))
print(BMR(self.gioi_tinh, self.can_nang, self.chieu_cao, self.tuoi))
print(TDEE(self.gioi_tinh, self.can_nang, self.chieu_cao, self.tuoi, self.chi_so_R))
print(LBM(self.gioi_tinh, self.can_nang, self.chieu_cao))
print(BFP(self.gioi_tinh, self.can_nang, self.chieu_cao, self.tuoi))
print(WHR(self.gioi_tinh, self.vong_eo, self.vong_hong))
print(IBW(self.gioi_tinh, self.chieu_cao))
print(NW(self.can_nang))
print(MA(self.gioi_tinh, self.can_nang, self.chieu_cao, self.tuoi))
TruongChinh = BodyIndex("nam", 1.7, 70, 18, 3, 85, 95)
TruongChinh.hien_thi_ket_qua()
# ... Và thêm nhiều người khác ở đây
CUỐI CÙNG CẢM ƠN CÁC BẠN ĐÃ TIN DÙNG THƯ VIỆN CỦA MÌNH
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
c_healthy-0.1.6.tar.gz
(5.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file c_healthy-0.1.6.tar.gz.
File metadata
- Download URL: c_healthy-0.1.6.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
911f46af0f3976813fad4ffaf274cd876c3ad9ecf2c7742d5ee2f0428dd84787
|
|
| MD5 |
4512f10b6c5dd5324e01a8362cfa8f6e
|
|
| BLAKE2b-256 |
a8c4738d72646fc77f6c76d029ffb08f9b390be3bd3147d56e95973cb7e5d2a5
|
File details
Details for the file C_healthy-0.1.6-py3-none-any.whl.
File metadata
- Download URL: C_healthy-0.1.6-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d4c8ff57359619c5376b368c1fbb4b0b95a14ee7eb8ea1ddf6277ca28b3c9e2
|
|
| MD5 |
e491cf75f94312b074928addb42890b8
|
|
| BLAKE2b-256 |
d422e448634c2fb2c40e3eb565684f2f9b4ad09d2b976aa338bb99fac5c5a1b7
|