forked from AndreAlbu/Questoes-beecrowd-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1040.py
38 lines (24 loc) · 757 Bytes
/
1040.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
a, b, c, d = input().split()
a = float(a)
b = float(b)
c = float(c)
d = float(d)
media = (a * 2 + b * 3 + c * 4 + d * 1) / 10.0
if(media >= 7.0):
print("Media: {0:.1f}".format(media))
print("Aluno aprovado.")
elif(media >= 5.0 and media <= 6.9):
print("Media: {0:.1f}".format(media))
print("Aluno em exame.")
notaExame = float(input())
print("Nota do exame: {0:.1f}".format(notaExame))
notaFinal = (media + notaExame) / 2
if(notaFinal >= 5.0):
print("Aluno aprovado.")
print("Media final: {0:.1f}".format(notaFinal))
else:
print("Aluno reprovado.")
print("Media final: {0:.1f}".format(notaFinal))
else:
print("Media: {0:.1f}".format(media))
print("Aluno reprovado.")