diff --git a/solutions/beecrowd/1040/1040.py b/solutions/beecrowd/1040/1040.py new file mode 100644 index 00000000..98ebac68 --- /dev/null +++ b/solutions/beecrowd/1040/1040.py @@ -0,0 +1,20 @@ +n1, n2, n3, n4 = map(float, input().split()) + +average = (n1 * 2 + n2 * 3 + n3 * 4 + n4) / 10 + +print(f'Media: {average:.1f}') +if average >= 7.0: + print('Aluno aprovado.') +elif average >= 5.0: + print('Aluno em exame.') + + final_test = float(input()) + + print(f'Nota do exame: {final_test:.1f}') + if (final_test + average) / 2.0 > 5.0: + print('Aluno aprovado.') + else: + print('Aluno reprovado.') + print(f'Media final: {(final_test + average) / 2.0:.1f}') +else: + print('Aluno reprovado.')