Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- datos = {}
- dicti = {}
- opcionMenu = int(input("""
- Que operacion desea hacer?
- ----------------------------------------|
- \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] |
- ----------------------------------------|
- """))
- # leer data.txt
- # index 0:DNI,1:APELLIDO,2:NOMBRES,3:SALDO,4:CUENTA BLOQUEADA BOLEAN5l
- # Aperturar cuenta
- if opcionMenu == 1:
- with open('myfile.txt', 'w') as f:
- print(dicti, file=f)
- lista = []
- datos['DNI'] = input("Ingrese DNI:\n")
- datos['apellido'] = input("Ingresa tu apellido:\n")
- datos['nombres'] = input("Ingresa tu nombre:\n")
- datos['saldo'] = 0
- datos['bloqueado'] = False
- datos['pin'] = int(input('Ingrese su numero de pin a crear:'))
- dicti[1] = datos
- elif opcionMenu == 2: #Deposito
- s = eval(open('myfile.txt', 'r').read())
- numerocuenta = int(input("Entra numero de cuenta:"))
- contra = int(input("Entra Pin: "))
- if contra == s[numerocuenta]['pin']:
- print("hola")
- # elif opcionMenu == 3:
- # elif opcionMenu == 4:
- # elif opcionMenu == 5:
- # elif opcionMenu == 6:
- # elif opcionMenu == 7:
- # elif opcionMenu == 8:
- # else:
- # print(opcionMenu)
- with open('myfile.txt', 'w') as f:
- print(dicti, file=f)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement