Created
December 24, 2011 21:27
-
-
Save ivanjr0/1518391 to your computer and use it in GitHub Desktop.
Conversão da nota do enem para 1ª etapa da UFMG - http://www.ufmg.br/online/arquivos/anexos/edital_formula_vest.pdf - http://enem2ufmg.appspot.com/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def enem2ufmg(nota): | |
if 0 <= nota <= 118.2600: | |
resultado = 0.005306951 * nota | |
elif 118.2600 < nota < 936.1355: | |
resultado = 0.0 | |
resultado += -1.7988096645 * nota | |
resultado += (4.18317311423 / 10 ** 2) * nota ** 2 | |
resultado -= (4.01229829463 / 10 ** 4) * nota ** 3 | |
resultado += (2.15052798975 / 10 ** 6) * nota ** 4 | |
resultado -= (6.9943909368 / 10 ** 9) * nota ** 5 | |
resultado += (1.371573523879 / 10 ** 11) * nota ** 6 | |
resultado -= (1.39474027440 / 10 ** 14) * nota ** 7 | |
resultado += (1.87288088561 / 10 ** 20) * nota ** 9 | |
resultado -= (2.31458931046 / 10 ** 23) * nota ** 10 | |
resultado += (1.251965455606 / 10 ** 26) * nota ** 11 | |
resultado -= (2.66581849143 / 10 ** 30) * nota ** 12 | |
elif nota >= 936.1355: | |
resultado = 64 | |
return round(resultado, 4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment