Skip to content

Commit

Permalink
Solve 1040 in python
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Jul 24, 2024
1 parent a129a31 commit 5498e17
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions solutions/beecrowd/1040/1040.py
Original file line number Diff line number Diff line change
@@ -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.')

0 comments on commit 5498e17

Please sign in to comment.