How would I approach this problem, I am to create a dictionary, where the name of the individual is a key and the values are a tuple made of list of marks(out of 10) and a list of Grade.
So, I have in a text file:
Josh
8 A
8 A
6 C
7 B
9 A
Pablo
7 A
9 B
8 A
9 B
9 B
output of that should be {Josh:([8,8,6,7,9],['A','A','C','B','A']), Pablo:([7,9,8,9,9],['A','B','A','B','B'])}
This is what i have so far:
def course_grading(student_file):
f = open('student.txt','r')
for line in f:
new_line = line.strip('\n').split()
Any ideas?