fork download
  1. student=[]
  2. n=int(input(""))
  3. for i in range(n):
  4. name=input("")
  5. score1=float(input(""))
  6. score2=float(input(""))
  7. score3=float(input(""))
  8. student.append([name,score1,score1,score3])
  9. for hs in student:
  10. name=hs[0]
  11. score1=hs[1]
  12. score2=hs[2]
  13. score3=hs[3]
  14. avg_score=(score1+score2+score3)/3
  15. print(f"Diem trung binh cua hoc sinh {name}: {avg_score}")
Success #stdin #stdout 0.08s 14044KB
stdin
3
thanh dat
10 
10
10
khai 
1
1
1
triet 
2
2
2

stdout
Diem trung binh cua hoc sinh thanh dat: 10.0
Diem trung binh cua hoc sinh khai : 1.0
Diem trung binh cua hoc sinh triet : 2.0