Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! usr/bin/env/python
- # -*- coding: utf-8 -*-
- #irc.vircio.org #brasil
- alunos = {'fulano':[6, 7, 5, 2], 'sicrano':[7, 8, 9, 8], 'beltrano':[10, 9, 10, 10]}
- for aluno,notas in alunos.items():
- media = 0
- for nota in notas:
- media += nota
- media = float(media) / len(notas)
- if media <= 6:
- print("Aluno: ",aluno,"Reprovado! Media:",media)
- else:
- print("Aluno",aluno,"Media",media)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement