Created
August 14, 2016 01:11
-
-
Save GuilhermeHideki/6edf1039bc164c269ba0f4949cccfcba to your computer and use it in GitHub Desktop.
;)
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
| <?php | |
| function nota_final($notas, $dificuldade) | |
| { | |
| sort($notas); | |
| array_pop($notas); | |
| array_shift($notas); | |
| return array_sum($notas) * $dificuldade; | |
| } |
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 nota_final(notas, dificuldade): | |
| return sum(sorted(notas)[1:-1]) * dificuldade |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment