🛠️ToolsShed

Flexibility Test

Evaluate your sit-and-reach flexibility score by age and gender.

FlexibilityTest.about

FlexibilityTest.aboutDesc

FlexibilityTest.categoryFlexibilityTest.male18_25FlexibilityTest.female18_25
Excellent39 cm43 cm
Good34 cm38 cm
Above Average29 cm34 cm
Average24 cm30 cm
Below Average18 cm25 cm
Poor13 cm20 cm
Very Poor0 cm0 cm

Frequently Asked Questions

Code Implementation

def evaluate_flexibility(
    reach_cm: float, age: int, gender: str
) -> dict:
    """
    Evaluate sit-and-reach flexibility test score.
    Returns rating based on normative data.
    """
    # Normative ranges (cm) [excellent, above_avg, average, below_avg]
    norms = {
        "male": {
            (0, 29):   [27, 17, 6, -5],
            (30, 39):  [25, 15, 4, -6],
            (40, 49):  [23, 13, 2, -7],
            (50, 59):  [20, 10, -1, -9],
            (60, 120): [17, 8, -3, -11],
        },
        "female": {
            (0, 29):   [30, 21, 12, 5],
            (30, 39):  [29, 20, 11, 4],
            (40, 49):  [27, 18, 9, 2],
            (50, 59):  [25, 16, 8, 0],
            (60, 120): [23, 14, 6, -2],
        },
    }

    thresholds = None
    for (low, high), values in norms.get(gender.lower(), {}).items():
        if low <= age <= high:
            thresholds = values
            break

    if thresholds is None:
        return {"error": "Age/gender out of range"}

    excellent, above_avg, average, below_avg = thresholds
    if reach_cm >= excellent:
        rating = "Excellent"
    elif reach_cm >= above_avg:
        rating = "Above Average"
    elif reach_cm >= average:
        rating = "Average"
    elif reach_cm >= below_avg:
        rating = "Below Average"
    else:
        rating = "Poor"

    return {"reach_cm": reach_cm, "rating": rating, "age": age, "gender": gender}

result = evaluate_flexibility(reach_cm=20, age=35, gender="male")
print(result)

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.