Calculates the check digit for a 12-digit product code. (Demonstration for UC Computational Thinking course)