Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- def media(alunos):
- if alunos == 0:
- return
- else:
- media(alunos - 1)
- print "\nAluno %d:" %(alunos)
- nota_1 = float(raw_input("Entre com a primeira nota: "))
- nota_2 = float(raw_input("Entre com a segunda nota: "))
- nota_3 = float(raw_input("Entre com a terceira nota: "))
- nota_4 = float(raw_input("Entre com a quarta nota: "))
- print "A média do aluno é: ", (nota_1 + nota_2 + nota_3 + nota_4) / 4
- quantidade = int(raw_input("Entre com a quantidade de alunos: "))
- media(quantidade)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement