Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. datos = {}
  2. dicti = {}
  3.  
  4. opcionMenu = int(input("""
  5.  
  6. Que operacion desea hacer?
  7. ----------------------------------------|
  8. \nAperturar cuenta-------------------[1] |\nRealizar deposito------------------[2] |\nRealizar retiro--------------------[3] |\nBloquear / Desbloquear cuenta------[4] |\nCerrar cuenta----------------------[5] |\nConsultar saldo--------------------[6] |\nConsultar movimientos de una cuenta[7] |\nSalir------------------------------[8] |
  9. ----------------------------------------|
  10. """))
  11. # leer data.txt
  12. # index 0:DNI,1:APELLIDO,2:NOMBRES,3:SALDO,4:CUENTA BLOQUEADA BOLEAN5l
  13. # Aperturar cuenta
  14.  
  15.  
  16.  
  17. if opcionMenu == 1:
  18. with open('myfile.txt', 'w') as f:
  19. print(dicti, file=f)
  20. lista = []
  21. datos['DNI'] = input("Ingrese DNI:\n")
  22. datos['apellido'] = input("Ingresa tu apellido:\n")
  23. datos['nombres'] = input("Ingresa tu nombre:\n")
  24. datos['saldo'] = 0
  25. datos['bloqueado'] = False
  26. datos['pin'] = int(input('Ingrese su numero de pin a crear:'))
  27. dicti[1] = datos
  28. elif opcionMenu == 2: #Deposito
  29. s = eval(open('myfile.txt', 'r').read())
  30.  
  31. numerocuenta = int(input("Entra numero de cuenta:"))
  32. contra = int(input("Entra Pin: "))
  33. if contra == s[numerocuenta]['pin']:
  34. print("hola")
  35.  
  36.  
  37. # elif opcionMenu == 3:
  38.  
  39. # elif opcionMenu == 4:
  40.  
  41. # elif opcionMenu == 5:
  42.  
  43. # elif opcionMenu == 6:
  44.  
  45. # elif opcionMenu == 7:
  46.  
  47. # elif opcionMenu == 8:
  48.  
  49. # else:
  50. # print(opcionMenu)
  51.  
  52. with open('myfile.txt', 'w') as f:
  53. print(dicti, file=f)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement