Calculateur du rapport taille-hanches
Calculez votre RTH et évaluez le risque de santé selon les directives de l'OMS.
WHO Risk Categories
Waist-to-Hip Ratio thresholds
| Sex | Low | Moderate | High | Very High |
|---|---|---|---|---|
| Male | <0.90 | 0.90–0.95 | 0.95–1.00 | ≥1.00 |
| Female | <0.80 | 0.80–0.85 | 0.85–0.90 | ≥0.90 |
Questions Fréquentes
Implémentation du Code
def waist_to_hip_ratio(waist_cm, hip_cm):
"""
Calculate Waist-to-Hip Ratio (WHR).
Parameters:
waist_cm - waist circumference in centimetres
hip_cm - hip circumference in centimetres
Returns WHR as a float.
"""
if hip_cm <= 0:
raise ValueError("Hip circumference must be greater than 0")
return waist_cm / hip_cm
def whr_risk(whr, gender):
"""
Classify WHR health risk using WHO thresholds.
gender: 'male' or 'female'
Returns: 'Low', 'Moderate', or 'High'
"""
if gender.lower() == 'male':
if whr < 0.90: return 'Low'
if whr < 1.00: return 'Moderate'
return 'High'
else: # female
if whr < 0.80: return 'Low'
if whr < 0.85: return 'Moderate'
return 'High'
def waist_height_ratio(waist_cm, height_cm):
"""
Waist-to-Height Ratio (WHtR) — supplementary metric.
Health threshold: < 0.5 for all adults.
"""
return waist_cm / height_cm
# Examples
whr = waist_to_hip_ratio(85, 98)
print(f"WHR: {whr:.2f}")
print(f"Risk (M): {whr_risk(whr, 'male')}")
print(f"Risk (F): {whr_risk(whr, 'female')}")
print(f"WHtR: {waist_height_ratio(85, 175):.2f}")Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.