1 oo=1 2 while oo<=3: 3 pp = 3 - oo 4 ee = input(‘账号:‘) 5 rr = input(‘密码:‘) 6 if ee==‘123‘ and rr==‘123‘: 7 print(‘欢迎登陆‘) 8 break 9 elif oo==3: 10 print(‘三次登陆失败,关闭!!‘) 11 break 12 else: 13 print(‘输入错误,还有‘+str(pp)+‘次机会‘) 14 oo+=1
原文地址:https://www.cnblogs.com/object1369881872/p/10289850.html
时间: 2024-10-18 03:17:09