作业:编写登陆接口
要求: 输入正确则显示欢迎信息,输入错误三次则锁定.
# Author:Bryce_Zhang username = "1" password = "2" for i in range(4): users = input("users:") pass1 = input("pass1:") if users == username and pass1 == password: print("账户密码正确登陆成功!") break else: if i == 3: print("您的账户已经锁定!") break i +=1
时间: 2024-10-05 17:40:09