Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Abhayparashar31/4e3dd53199b0da098af6e56e60cd2f43 to your computer and use it in GitHub Desktop.
Save Abhayparashar31/4e3dd53199b0da098af6e56e60cd2f43 to your computer and use it in GitHub Desktop.
from statistics import mean
num = int(input())
names =[]
for i in range(0,num):
names.append(list(map(str, input().split())))
data =[]
check_name = str(input())
for i in range(0,num):
if names[i][0]==check_name:
data.append(names[i][1:])
number =[]
for i in range(0,len(data[0])):
number.append(float(data[0][i]))
print("%.2f" % mean(number))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment