python 通登录银行_银行ATM程序登录

attempts = 0

store_id = [1057, 2736, 4659, 5691, 1234, 4321]

store_name = ["Jeremy Clarkson", "Suzanne Perry", "Vicki Butler-Henderson", "Jason Plato"]

store_balance = [172.16, 15.62, 23.91, 62.17, 131.90, 231.58]

store_pin = [1057, 2736, 4659, 5691]

start = int(input("Are you a member of the Northern Frock Bank?\n1. Yes\n2. No\n"))

if start == 1:

idguess = ""

pinguess = ""

while (idguess not in store_id) or (pinguess not in store_pin):

idguess = int(input("ID Number: "))

pinguess = int(input("PIN Number: "))

if (idguess not in store_id) or (pinguess not in store_pin):

print("Invalid Login")

attempts = attempts + 1

if attempts == 3:

print("This ATM has been blocked for too many failed attempts.")

break

elif start == 2:

name = str(input("What is your full name?: "))

pin = str(input("Please choose a 4 digit pin number for your bank account: "))

digits = len(pin)

balance = 100

while digits != 4:

print("That Pin is Invalid")

pin = str(input("Please choose a 4 digit pin number for your bank account: "))

digits = len(pin)

store_name.append(name)

store_pin.append(pin)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值