В вашем примере оценки (словарь) обновляются каждый раз с новым парой ключ-значение.
>>> grades = { 'k':'x'}
>>> grades
{'k': 'x'}
>>> grades = { 'newinput':'newval'}
>>> grades
{'newinput': 'newval'}
>>>
То, что вы должны были сделать, это обновить пару ключ-значение для того же слова:
>>> grades = {}
>>> grades['k'] = 'x'
>>> grades['newinput'] = 'newval'
>>> grades
{'k': 'x', 'newinput': 'newval'}
>>>
Попробуйте это :
>>> grades = {}
>>> while True:
... k = raw_input('Please enter the module ID: ')
... val = raw_input('Please enter the grade for the module: ')
... grades[k] = val
...
Please enter the module ID: x
Please enter the grade for the module: 222
Please enter the module ID: y
Please enter the grade for the module: 234
Please enter the module ID: z
Please enter the grade for the module: 456
Please enter the module ID:
Please enter the grade for the module:
Please enter the module ID: Traceback (most recent call last):
File "<stdin>", line 2, in <module>
KeyboardInterrupt
>>>
>>> grades
{'y': '234', 'x': '222', 'z': '456', '': ''}
>>>