File size: 178 Bytes
1719436
 
 
 
 
 
 
1
2
3
4
5
6
7
8
import numpy as np


def grade_to_weight(g: str) -> float:
    """Convert a grade string to a weight value."""
    parts = list(map(int, g.split('-')))
    return np.mean(parts)