hacker rank python(finding the percentage)solution

FINDING THE PERCENTAGE

l,k=[],[]
a=int(input())
for i in range(a):
        k=input().split()
        l.append(k)
x=input()
for i in range(a):
    if(l[i][0]==x):
        c=float(l[i][1])+float(l[i][2])+float(l[i][3])
        print("%.2f"%(c/3.0))
     

Compiler Message
Success
Input (stdin)Download
3
Krishna 67 68 69
Arjun 70 98 63
Malika 52 56 60
Malika
Expected OutputDownload
56.00

Comments

Popular posts from this blog

Amazon Web Services

Google Code-In mentorship experience :)

Hacker Rank all java and python problem solutions