IF midterm > 75.47 AND
     IF midterm > 95.31 AND
         IF takehome > 102.13 AND
             IF midterm > 98.435 AND
                 IF tutorial > 98.3 THEN
                     final = 108.89
                 IF tutorial <= 98.3 THEN
                     final = 107.78
             IF midterm <= 98.435 THEN
                 final = 102.22
         IF takehome <= 102.13 AND
             IF tutorial > 105.45 THEN
                 final = 88.89
             IF tutorial <= 105.45 AND
                 IF tutorial > 98.1 THEN
                     final = 102.78
                 IF tutorial <= 98.1 AND
                     IF tutorial > 88.34 THEN
                         final = 95
                     IF tutorial <= 88.34 THEN
                         final = 90.83
     IF midterm <= 95.31 AND
         IF midterm > 90.935 AND
             IF tutorial > 100.745 AND
                 IF tutorial > 103.425 THEN
                     final = 87.22
                 IF tutorial <= 103.425 THEN
                     final = 94.44
             IF tutorial <= 100.745 AND
                 IF tutorial > 89.615 AND
                     IF assignment > 93.16 THEN
                         final = 68.06
                     IF assignment <= 93.16 AND
                         IF tutorial > 96.055 THEN
                             final = 72.22
                         IF tutorial <= 96.055 THEN
                             final = 73.89
                 IF tutorial <= 89.615 THEN
                     final = 89.17
         IF midterm <= 90.935 AND
             IF midterm > 90 AND
                 IF tutorial > 91.33 THEN
                     final = 101.11
                 IF tutorial <= 91.33 THEN
                     final = 99.17
             IF midterm <= 90 AND
                 IF tutorial > 100.63 AND
                     IF tutorial > 108.145 THEN
                         final = 83.33
                     IF tutorial <= 108.145 THEN
                         final = 78.89
                 IF tutorial <= 100.63 AND
                     IF assignment > 88.62 AND
                         IF takehome > 100.37 AND
                             IF tutorial > 94.625 THEN
                                 final = 85.56
                             IF tutorial <= 94.625 THEN
                                 final = 85
                         IF takehome <= 100.37 AND
                             IF takehome > 93.24 AND
                                 IF tutorial > 89.385 THEN
                                     final = 92.78
                                 IF tutorial <= 89.385 THEN
                                     final = 92.22
                             IF takehome <= 93.24 AND
                                 IF tutorial > 89.18 THEN
                                     final = 90
                                 IF tutorial <= 89.18 THEN
                                     final = 91.11
                     IF assignment <= 88.62 THEN
                         final = 82.22
 IF midterm <= 75.47 AND
     IF midterm > 39.69 AND
         IF takehome > 31.875 AND
             IF takehome > 100.83 AND
                 IF tutorial > 95.865 AND
                     IF tutorial > 98.24 THEN
                         final = 83.06
                     IF tutorial <= 98.24 THEN
                         final = 80.56
                 IF tutorial <= 95.865 AND
                     IF tutorial > 88.84 THEN
                         final = 64.72
                     IF tutorial <= 88.84 THEN
                         final = 56.39
             IF takehome <= 100.83 AND
                 IF midterm > 40.625 AND
                     IF tutorial > 75.42 AND
                         IF tutorial > 86.76 AND
                             IF midterm > 74.06 THEN
                                 final = 39.72
                             IF midterm <= 74.06 AND
                                 IF assignment > 74.06 AND
                                     IF assignment > 82.395 AND
                                         IF midterm > 62.5 AND
                                             IF midterm > 65.31 AND
                                                 IF assignment > 91.175 AND
                                                     IF takehome > 98.33 THEN
                                                         final = 68.33
                                                     IF takehome <= 98.33 AND
                                                         IF tutorial > 101.52 THEN
                                                             final = 63.33
                                                         IF tutorial <= 101.52 AND
                                                             IF tutorial > 94.345 THEN
                                                                 final = 65.28
                                                             IF tutorial <= 94.345 THEN
                                                                 final = 65.56
                                                 IF assignment <= 91.175 AND
                                                     IF tutorial > 88.065 THEN
                                                         final = 55
                                                     IF tutorial <= 88.065 THEN
                                                         final = 58.33
                                             IF midterm <= 65.31 THEN
                                                 final = 75.56
                                         IF midterm <= 62.5 AND
                                             IF tutorial > 97.105 AND
                                                 IF midterm > 55.625 THEN
                                                     final = 50
                                                 IF midterm <= 55.625 AND
                                                     IF tutorial > 102.38 THEN
                                                         final = 67.22
                                                     IF tutorial <= 102.38 AND
                                                         IF midterm > 48.75 AND
                                                             IF tutorial > 99.065 THEN
                                                                 final = 63.89
                                                             IF tutorial <= 99.065 THEN
                                                                 final = 63.61
                                                         IF midterm <= 48.75 THEN
                                                             final = 60.56
                                             IF tutorial <= 97.105 AND
                                                 IF tutorial > 96.205 THEN
                                                     final = 50
                                                 IF tutorial <= 96.205 THEN
                                                     final = 48.89
                                     IF assignment <= 82.395 AND
                                         IF takehome > 82.13 THEN
                                             final = 72.22
                                         IF takehome <= 82.13 AND
                                             IF tutorial > 95.16 THEN
                                                 final = 66.11
                                             IF tutorial <= 95.16 THEN
                                                 final = 66.67
                                 IF assignment <= 74.06 AND
                                     IF midterm > 60 THEN
                                         final = 61.39
                                     IF midterm <= 60 AND
                                         IF tutorial > 91.245 THEN
                                             final = 43.33
                                         IF tutorial <= 91.245 THEN
                                             final = 46.67
                         IF tutorial <= 86.76 AND
                             IF tutorial > 84.92 AND
                                 IF midterm > 69.69 THEN
                                     final = 80
                                 IF midterm <= 69.69 THEN
                                     final = 88.89
                             IF tutorial <= 84.92 AND
                                 IF tutorial > 81.225 AND
                                     IF tutorial > 82.51 THEN
                                         final = 57.78
                                     IF tutorial <= 82.51 THEN
                                         final = 62.5
                                 IF tutorial <= 81.225 THEN
                                     final = 77.5
                     IF tutorial <= 75.42 AND
                         IF assignment > 78.52 AND
                             IF tutorial > 64.285 AND
                                 IF tutorial > 67.71 THEN
                                     final = 47.78
                                 IF tutorial <= 67.71 THEN
                                     final = 45.56
                             IF tutorial <= 64.285 THEN
                                 final = 50.83
                         IF assignment <= 78.52 AND
                             IF tutorial > 46.3 AND
                                 IF tutorial > 61.81 THEN
                                     final = 65.28
                                 IF tutorial <= 61.81 THEN
                                     final = 68.33
                             IF tutorial <= 46.3 AND
                                 IF midterm > 65.63 THEN
                                     final = 55.83
                                 IF midterm <= 65.63 THEN
                                     final = 52.5
                 IF midterm <= 40.625 THEN
                     final = 78.89
         IF takehome <= 31.875 AND
             IF midterm > 45.94 AND
                 IF tutorial > 102.275 THEN
                     final = 36.11
                 IF tutorial <= 102.275 AND
                     IF tutorial > 91.09 AND
                         IF tutorial > 97.39 THEN
                             final = 49.44
                         IF tutorial <= 97.39 THEN
                             final = 50.83
                     IF tutorial <= 91.09 THEN
                         final = 53.33
             IF midterm <= 45.94 THEN
                 final = 35.83
     IF midterm <= 39.69 AND
         IF takehome > 92.685 THEN
             final = 28.06
         IF takehome <= 92.685 AND
             IF midterm > 39.065 THEN
                 final = 34.44
             IF midterm <= 39.065 AND
                 IF midterm > 29.375 AND
                     IF tutorial > 70.57 AND
                         IF tutorial > 92.845 THEN
                             final = 49.17
                         IF tutorial <= 92.845 THEN
                             final = 48.89
                     IF tutorial <= 70.57 THEN
                         final = 51.67
                 IF midterm <= 29.375 AND
                     IF tutorial > 83.145 THEN
                         final = 47.78
                     IF tutorial <= 83.145 THEN
                         final = 45.56