Input Format
The first line contains the integer , the number of students. The next  lines contains the name and marks obtained by that student separated by a space. The final line contains the name of a particular student previously listed.
Constraints
Output Format
Print one line: The average of the marks obtained by the particular student correct to 2 decimal places.
hackerrank finding the percentage problem solution in python

Problem solution in python 2 programming language.

d={}
for i in range(int(raw_input())):
 line=raw_input().split()
 d[line[0]]=sum(map(float,line[1:]))/3

print '%.2f' % d[raw_input()]

Problem solution in python 3 programming language.

d={}
for i in range(int(input())):
 line= input().split()
 d[line[0]]=sum(map(float,line[1:]))/3

print '%.2f' % d[input()]

Second solution

if __name__ == '__main__':
    n = int(input())
    student_marks = {}
    for _ in range(n):
        name, *line = input().split()
        scores = list(map(float, line))
        student_marks[name] = scores
    query_name = input()
    if query_name in student_marks:
        x = ((float(student_marks[query_name][0]) + 
float(student_marks[query_name][1]) + 
float(student_marks[query_name][2])) / 3)
    print('%.2f' % x)