Calculate Average Patient Age

Medium

📝 Description

Calculate the average age of patients from a list.

Input Format

[{"name": str, "age": int}]

Output Format

float (average age)

Constraints

1 ≤ number of patients ≤ 1000, 0 ≤ age ≤ 120

🔍 Sample Input

[{"name": "Alice", "age": 30}, {"name": "Bob", "age": 40}]
            

✅ Sample Output

35.0
            

Code Editor

Please login to run and submit code.

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