Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lst = []
- dic ={}
- opçao = ' '
- while True:
- print('________CADASTRO DE ALUNOS______')
- dic.clear()
- nome = str(input('nome: '))
- idade =int(input('idade: '))
- nota =float(input('nota: '))
- dic['nome']=nome
- dic['idade']=idade
- dic['nota']= nota
- lst.append(dic.copy())
- print('''O que deseja fazer?
- [A] cadastra.
- [B] listar cadastro.
- [C] sair.''')
- opçao = str(input('O que deseja fazer?.A,b ou C: ')).strip().upper()[0]
- while opçao not in 'ABC':
- opçao = str(input('NÃO INTENDIE!!!! \n O que deseja fazer?.A,b ou C: ')).strip().upper()[0]
- if opçao =='B':
- print(lst)
- break
- if opçao == 'C':
- break
- for i in range(len(lst)):
- print(f'''CADASTRO ALUNO {i} :
- NOME:{lst[i]['nome']}
- IDADE: {lst[i]['idade']}
- NOTA: {lst[i]['nota']}''')
- print('#'*90)
- print('#'*90)
- print('FIM OBRIGADO !!!!!!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement