Skip to content

Instantly share code, notes, and snippets.

@leportella
Last active June 27, 2018 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leportella/3099b04067a5110262081aa966e4b4c6 to your computer and use it in GitHub Desktop.
Save leportella/3099b04067a5110262081aa966e4b4c6 to your computer and use it in GitHub Desktop.
Script que calcula percentual de alunos acima da média
import numpy as np
def percentual_acima_da_media(notas):
total_alunos = len(notas)
alunos_acima_media = len(notas[notas>notas.mean()])
return alunos_acima_media / total_alunos
10 percentual_acima_da_media(np.array([]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment