-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path06.py
More file actions
27 lines (23 loc) · 691 Bytes
/
Copy path06.py
File metadata and controls
27 lines (23 loc) · 691 Bytes
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
#Exercicio 6
'''
Faça um Programa que peça as quatro notas de 10 alunos,
calcule e armazene num vetor a média de cada aluno,
imprima o número de alunos com média maior ou igual a 7.0.
'''
notas = []
media_turma = []
cont = 1
for i in range(10):
print('\nAluno ',cont)
for j in range(4):
nota = float(input('Digite a nota: '))
notas.append(nota)
media = sum(notas) / len(notas)
media_turma.append(media)
print('\nNotas:', notas,'\nMedia: %.2f'% media)
cont += 1
notas.clear()
print('\nMelhores Medias\n')
for i in range(10):
if media_turma[i] >= 7:
print('Aluno nº ',i + 1,'Media: ',media_turma[i])