#__author__: Administrator #date: 2018/5/5 _uesr = "leiyun520" _psaa = "5201314" #for i in range(1,15,2):# 1 是循环开始次数,15 是循环总次数,2是每次循环步长(每次循环跳几次) for i in range(3): uesrName = input("UesrName:") password = input("Password:") if uesrName == _uesr and password == _psaa: print("登录成功") break else: print("账号或密码错误!") else: exit("输入次数限制,请重新启动程序!")
for循环
最新推荐文章于 2024-02-28 21:09:23 发布