Created
April 23, 2017 18:15
-
-
Save RIENEGAN/58a9c4da54f14798c084da28dd7ec073 to your computer and use it in GitHub Desktop.
MODIFICACION DE ARCHIVOS BAUTISTA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time, os | |
print("=====================\nBienvenido al cajero\n=====================") | |
# temporizador y limpiado de pantalla | |
time.sleep(1) | |
os.system("clear") | |
# variables | |
atras = ('y') # para cancelar el proceso | |
intentos = 3 | |
balance = 10000 | |
# para repetir los intentos de indroduccion del pin(clave) | |
while intentos >= 0: | |
print("Usted tiene ",intentos," Intentos Para Ingresar\n")# Modificacion de intentos | |
Validar_Tarjeta=input("Digite Los 16 Numeros De Su Tarjeta :") | |
pin = int(input("Digite su pin :")) | |
if Validar_Tarjeta=="1020304050607080" and pin == (1234): # Validando nº de cuenta y pin | |
print("Bienvenido....Ha iniciado Seccion Correctamente\n. ") | |
while atras not in ('n', 'NO', 'N', 'no'): # condicion para seguir en el menu | |
print("===Menu===\n1-Balance\n2-Retiro\n3-Deposito\n4-Salir\n==========") | |
op = int(input()) | |
time.sleep(2) | |
os.system("clear") | |
if op == 1: | |
print("Su balance actual es ", balance) | |
atras = input("Desea realizar otra operacion ?") | |
if atras in ('n', 'NO', 'N', 'no'): # condicion para cancelar el proceso y salir de la app | |
print("") | |
print("Gracias ....Adios") | |
exit() # era break pero me retresaba a pedir pin otra ves | |
elif op == 2: | |
op2 = ('y') | |
retiro = int(input("\n 100 200\n 500 1000 \n Digite la cantidad ha retirar : ")) | |
if retiro in [100, 200, 500, 1000]: | |
balance -= retiro | |
print("Su balance es ", balance) | |
atras = input("Desea realizar otra operacion ?") | |
if atras in ('n', 'NO', 'N', 'no'): | |
print("") | |
print("Gracias ....Adios") | |
exit() | |
elif retiro != [100, 200, 500, 1000]: | |
print("cantidad no valida!!!") | |
atras = ('y') | |
atras = input("Desea realizar otra operacion ?") | |
if atras in ('n', 'NO', 'N', 'no'): | |
print("Gracias ....Adios") | |
exit() | |
elif retiro ==1: | |
retiro = int(input("intente otra cantidad")) | |
elif op == 3: | |
deposito = int(input("Digite la cantidad ha depositar :")) | |
balance += deposito | |
print("Su balance actual es ", balance) | |
if atras in ('n', 'NO', 'N', 'no'): | |
print("") | |
print("Gracias ....Adios") | |
exit() | |
elif op==4: | |
print("Cerrando.......") | |
exit() | |
elif Validar_Tarjeta!="1020304050067080" and pin!= ('1234'): #modificacion | |
print("Lo Sentimos, Los Dato Que Ha Ingresado No Coinciden, Verifique Su Marcacion\n") | |
intentos -= 1 | |
if intentos == 0: | |
print("No mas intentos, hasta luego") | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment