Example of how to read the table below: "If you percentage is at least 92, then you get at least 3.6." In particular, I may give everybody a better score than what is indicated below. This is just meant to give you a guaranteed lower bound.
to_grade_table = [
(98,4),
(96.5,3.9),
(95,3.8),
(93.5,3.7),
(92,3.6),
(90.5,3.5),
(89,3.4),
(87.5,3.3),
(86,3.2),
(84.5,3.1),
(83,3.0),
(81.5,2.9),
(80,2.8),
(78.5,2.7),
(77,2.6),
(75.5,2.5),
(74,2.4),
(72.5,2.3),
(71,2.2),
(69.5,2.1),
(68,2.0),
(66.5,1.9),
(65,1.8),
(63.5,1.7),
(62,1.6),
(60.5,1.5),
(59,1.4),
(57.5,1.3),
(56,1.2),
(54.5,1.1),
(53.0,1.0),
(51.5,0.9),
(50.1,0.8),
(50.0,0.7),
(0,0)]