Advertisement
Guest User

tentaiva 2 do zerro

a guest
Nov 13th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. # nome do arquivo dados_banco
  2. import csv
  3.  
  4.  
  5. def inseri_conta():
  6. pessoa = {}
  7. lst = []
  8. print('_____________BEM VINDO AO BANCO VIRTUAL_______________')
  9. print('\n')
  10. print('DIGITE NOME DO TITULAR:')
  11. pessoa['nome'] = input('digite nome : ')
  12. pessoa['saldo'] = 0
  13. print('DIGITE CPF DO TITULAR: ')
  14. pessoa['cpf'] = input()
  15. lst.append(pessoa)
  16. print('PRONTO JA RECLHEMOS TODOS DADOS NESSESARIOS PRA CRIAR SUA CONTA EM NOSSO BANCO OBRIGADO..')
  17.  
  18. with open('lista_bancovrt2.csv', 'a', newline='') as csvfile:
  19. lista_bancovrt2 = csv.writer(
  20. csvfile, delimiter=' ',
  21. quotechar='|', quoting=csv.QUOTE_MINIMAL)
  22. lista_bancovrt2.writerow([pessoa['nome'], pessoa['saldo'], pessoa['cpf']])
  23.  
  24. def set_opçao(opçao):
  25. if opçao == '1':
  26. inseri_conta()
  27.  
  28.  
  29.  
  30. def menu_banco():
  31. print("""\n
  32. ------- agenda ---------
  33. 1 - Insere conta
  34. 2 - Lista
  35.  
  36. \n""")
  37. print('Digite a opção: ')
  38. opçao = input()
  39. set_opçao(opçao)
  40. # aqui segundo arquivo
  41. # main
  42.  
  43. from agenda import menu_agenda
  44. from dados_banco import menu_banco
  45.  
  46. if __name__ == "__main__":
  47. #menu_agenda()
  48. menu_banco()
  49. tu ta vendo algum erro aqui ?????
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement