A teacher's scores arrive as text records like "ana:90". Some are broken.
Write two functions:
parse_record(record) returns a tuple (name, score), with the name stripped of spaces and the score as a whole number. It raises a ValueError when:
":" in the record: raise ValueError("missing score: " + record)int(): let int() raise its own ValueError0 or above 100: raise ValueError("score out of range: " + record)A record has at most one colon. Strip spaces from the score text before int().
load_records(records) runs parse_record on each record in order and returns a list of two things: a dictionary of name → score for the good records, and a list of the error messages (as text) for the bad ones. If a name appears twice, the later score wins.