A respostas estão no meu notebook: https://colab.research.google.com/drive/1lDz9UMM2-m0GXbbOwOmEOmmZkBYvGOg3?usp=sharing
Eu achei bem divertido.
Eu amei fazer a questão 15:
setores = {'Setor A': [22, 26, 30, 30, 35, 38, 40, 56, 57, 65],
'Setor B': [22, 24, 26, 33, 41, 49, 50, 54, 60, 6],
'Setor C': [23, 26, 26, 29, 34, 35, 36, 41, 52, 56],
'Setor D': [19, 20, 25, 27, 34, 39, 42, 44, 50, 65]}
print("=== Média oor Setor ===")
for setor, idades in setores.items():
media_setor = sum(idades) / len(idades)
print(f"{setor}: {media_setor:.2f} anos")
todas_idades = []
for idades in setores.values():
todas_idades += idades
media_geral = sum(todas_idades) / len(todas_idades)
acima = sum(1 for idade in todas_idades if idade > media_geral)
print(f"Média geral: {media_geral:.2f} anos")
print(f"Idades acima da média geral: {acima}")