Calculates Grades in Python. Uses databases