I am trying to write a program that will keep track of a student’s grades in all of his courses. The student adds the course and also adds the different segments of the course and how they are weighted, which is why I was planning on using a dictionary. I’ve been using an input function to allow the user to enter the name of each segment. The dictionary might look like this:
{“homework”: .2, “tests”: .8}
Each course might have different weightings or even a different number of segments. So to keep track of the grades I want to make a homework list and a tests list that the student can enter his grades into. Therefore, I want what the user enters to be the name of the list that keeps track of the grades, so I can store the students grades in a list. Thoughts? Or can you think of a better way of doing this?
I am trying to write a program that will keep track of a student’s
Share
Data structures can be nested.