Commit 890fd599 by BellCodeEditor

save project

parent 2ed48a7c
Showing with 8 additions and 1 deletions
username = "xxz" # 保存在服务器数据库中的用户账号(正确的账号) username = "xxz" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
while True: while True:
if i>0:
name = input("用户名:")# 请用input()实现用户输入账号、密码的功能 name = input("用户名:")# 请用input()实现用户输入账号、密码的功能
password = input("密码:") password = input("密码:")
i -= 1
if name == username and password == userpassword: if name == username and password == userpassword:
print("成功") print("成功")
break break
if name != username: if name != username:
print("用户不存在") print("用户不存在")
print("提示:你还有"+str(i)+"机会")
continue continue
if password !=userpassword: if password !=userpassword:
print("失败") print("失败")
print("提示:你还有"+str(i)+"机会")
else:
print("账号锁定")
exit()
print("欢迎") print("欢迎")
......
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