title: Finding Percentages marks
body: <p>We have a record of  students. Each record contains the student's name, and their percent marks in Maths, Physics and Chemistry. The marks can be floating values. The user enters some integer  followed by the names and marks for students. We are required to save the record in a dictionary data type. The user then enters a student's name. Output the average percentage marks obtained by that student, correct to two decimal places.</p>
  
  <p>I have tried the following but I am getting an error for some n values</p>
  
  <pre><code>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()
      query_score=student_marks[query_name]
      a=(sum(query_score)/n)
      print("{0:.2f}".format(a))
  </code></pre>