Review this Python scoring code.
Accuracy is mediocre and inconsistent even though the model is good. Find the alignment bug.