Find Patients with High BMI

Medium

📝 Description

Filter patients with BMI ≥ 30 (Obese). BMI = weight(kg) / height(m)^2.

Input Format

[{"name": str, "weight": float, "height": float}]

Output Format

[{"name": str, "bmi": float}] (filtered)

Constraints

1 ≤ number of patients ≤ 1000, 0 < weight, height ≤ 300

🔍 Sample Input

[{"name": "Alice", "weight": 90, "height": 1.7}, {"name": "Bob", "weight": 70, "height": 1.8}]
            

✅ Sample Output

[{"name": "Alice", "bmi": 31.14}]
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run