Commit fd15549b by BellCodeEditor

save project

parent eba421e4
Showing with 17 additions and 12 deletions
i=5
username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
while True:
c = input("请输入用户名称")
d = input("请输入密码")
if c !=username:
print("用户名错误,请从新输入")
continue
if d !=userpassword:
print("密码错误,请从新输入")
continue
if c==username and d==userpassword:
print("登陆成功")
if i>0:
c = input("请输入用户名称")
d = input("请输入密码")
i-=1
if c !=username:
print("用户名错误,请从新输入")
continue
if d !=userpassword:
print("密码错误,请从新输入")
continue
if c==username and d==userpassword:
print("登陆成功")
break
print("欢迎来到贝编程")
else:
print("用户账号已被封锁")
break
print("欢迎来到贝儿编程")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment