Commit 861ed1c3 by BellCodeEditor

save project

parent 8aa8d5b0
Showing with 17 additions and 11 deletions
username = "4" # 保存在服务器数据库中的用户账号(正确的账号) username = "4" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "8" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "8" # 保存在服务器数据库中的用户密码(正确的密码)
c=3
# 请用input()实现用户输入登陆登陆成功、密码的功能 # 请用input()实现用户输入登陆登陆成功、密码的功能
while True: while True:
name=input("输入账号") if c>0
password=input("输入密码") name=input("输入账号")
if username==name and userpassword == password: password=input("输入密码")
print("登陆成功") c-1
break if username==name and userpassword == password:
if username != name: print("登陆成功")
print("账号错误") break
continue if username != name:
if userpassword != password: print("账号错误")
print("密码错误") continue
if userpassword != password:
print("密码错误")
else:
print("账号被封禁")
exit()
print("欢迎") 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