You should not print out the read (name, score) pairs, but rather store them in a list.
When you have read all the elements, you can sort the list backward.
Look at Example 3 here plus apply reverse = True sorting parameter.
After this, you can take the top 5 elements from your list.
Now it's your turn to get this coded.
Good luck!