Grade Calculator


As a university student, my grades are my top priority. When my grade platforms are spread across 4 different platforms and, as a result, have no “test grade” option, it can be difficult to see how my grades play off of each other. Well, I’m studying engineering, and now I have a problem. What is Engineering made for? Solving a problem.

If I ever do bad an assignment or am trying to book flights for breaks, and see how badly my grade will be docked if I don’t turn in X or skip class on day Y. It gives me both peace of mind and gives me an opportunity to practice my Python skills.


Fall 2025

This was the first model of my grade calculator. Unlike my newer models, this one takes an input of specific google sheets/excel files and reads them into various Python files, which all interact with each other.

Benefit: Less hardcoded grades
Drawbacks: An obnoxious amount of code, overcomplicating something that doesn’t need to be.

This section of code reads the input Google Sheets files and stores them.

This section is responsible for converting these stored grade value points into a letter grade and stopping the clock that is running.

This section checks if the names of the files are correct. One misspelling and that’s it.

This section of code manages the data and filters through sections of the class such as exams, projects, homework, etc. Then it runs it through a grading scale and stores those values.

These are just small clips of the code; the actual code spans 9 VS Code files and 823 lines of working code, not including whitespace. Inefficient, if you ask me. I can do better.


Spring 2026

This was my 2nd model. Major change: I condensed it all into one VS Code file and eliminated the need for a folder or input files.

Benefit: Condensed into one file, easier to read. More organized.
Drawbacks: Grades are hardcoded, functions do too much

These clips of code shows one of my class functions. Notice how I did functions for each class section(homework, exams, lecture attendance, etc) and passed them back to the main class function. Here that is a class called MFET 163.

These 2 blocks show how my code handles the class functions, and calculates out, and prints out the values for me to see.


This code block actually isn’t a function; this section is the calling section below the if_name section of a main file in VS Code. You can see just how complicated it got.

This is much more efficient than the previous version. But it still has 433 lines of code, and factors in extra credit in a weird way.


Fall 2026


This is my 3rd and current model. The Major change with this version is that instead of labeling and hardcoding each grade on it’s seperate line, I condensed it. In addition, I made better use of re-using functions and variable passing.

Benefit: Further condensed the design, re-used functions, better use of weight changes and loops.
Drawbacks: When I am inputting the grades, it’s hard to remember which grade is which since they are no longer labeled. I could consider labeling with comments, but I don’t believe that would clarify enough when I am inputting the scores.

This block of code shows how the main code processes each class, and checks if the final has been graded, and if there were exams grades, or homeworks. Sometimes scores get dropped and if I only have 1 homework graded, and drop that homework, it will show that my homework section is 0%, which is wrong.


This code block shows how this project collects data from the classes and manages is.


This block of code handles the dropping of different scores across the classes.

This block of codes shows how different classes sometimes have different score to letter to gpa sclaes, and how I can manage it. For physics it was a small scale, so I just kept it as it was. But I also have the standard scale for my other classes which for the most part use that scale.


This code block is responsible for applying the classes which have variable exam weights, such as my thermodynamics class takes the average of my midterm exams and my final exam score, and assigns the heavier weight to whichever I did better on. But if the final hasn’t been graded yet, that doesn’t make sense. So this makes sure that the midterms take on the heavier weight for now.

This is even more efficient than the past models, and sits at a nice 183 lines of working code, which is much more condensed. Since this model is still a work in progress, and it’s not even mid-semester yet, forms of extra credit haven’t yet factored into the code.