Source code of Grade.py