Dictionary<string, List> notasAlunos = new Dictionary<string, List> { { "Bárbara Elen", new List { 10, 15, 12, 8, 5 } }, { "Alice Ellen", new List { 10,15,5,25 } }, { "Sarah Bianca", new List { 20, 18, 22, 24, 16 } }, { "Alex Junio", new List { 4, 5, 6, 5, 4 } }, }; foreach (var aluno in notasAlunos) { double soma = 0; for (int i = 0; i < aluno.Value.Count; i++) { soma += aluno.Value[i]; } double media = soma / aluno.Value.Count; Console.WriteLine($"Média de {aluno.Key}: {media}"); }