Commit 6b06a9b0 by BellCodeEditor

auto save

parent 6c920c9d
Showing with 8 additions and 6 deletions
i=3 i=3
username = "sb" # 保存在服务器数据库中的用户账号(正确的账号) username = "6" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "54088" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
while True: while True:
if i>0: if i>0:
name=input("输入:") name=input("输入名字:")
password=input("输入密码:") password=input("输入密码:")
i-=1 i-=1
if name ==username and password == userpassword: if name ==username and password == userpassword:
print("成功") print("成功")
break break
elif name != username: elif name != username:
print("名字错") print("名字错了")
print("还有"+str(i)+"次机会")
continue continue
else: else:
print("密码错") print("密码错了")
print("还有"+str(i)+"次机会")
else: else:
print("锁定账号,你个*********") print("锁定账号")
exit() 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