Design a function nota_final(d_notes, d_proves) which, given a dictionary d_proves that associates exams of a subject with their weighting in the final note, and another dictionary d_notes that associates each partial taken by a student with the grade obtained, returns the final grade obtained by the student rounded to 2 decimals and a dictionary that associates the tests the student hasn’t taken with the value ’NP’.
>>> d_proves = {'lab1':0.1, 'lab2':0.1, 'lab3':0.15, 'lab4': 0.15, 'prac':0.25, ... 'teo1':0.10, 'teo2':.15} >>> d_notes = {'teo1': 8, 'lab1':8.5, 'lab2':7.5, 'prac':6.0, 'lab3': 9.0} >>> nota = 5.25 >>> d_no_presentat = {'lab4': 'NP', 'teo2': 'NP'} >>> (n, dnp) = nota_final(d_notes, d_proves) >>> if (n, dnp) != (nota, d_no_presentat): print(n, dnp)