Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. cad = open('cadastro.txt','w')
  2. aluno = []
  3. laluno = []
  4. print(""" OPÇÔES
  5. 1 - cadastrar novo aluno
  6. 2 - listar alunos cadastrados
  7. 3 - buscar aluno
  8. 4 - remover aluno """)
  9. opt = input('Digite uma opção: ')
  10.  
  11. def cadastrar_aluno():
  12. aluno = str(input("Digite o nome do aluno:"))
  13. aluno=aluno.upper()
  14.  
  15. def listar_alunos ():
  16. print('Alunos Matriculados', laluno)
  17.  
  18. if opt == '1':
  19. cadastrar_aluno()
  20. laluno.append(aluno)
  21.  
  22. elif opt == '2':
  23. listar_alunos()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement