Commit 4f3aef9f by BellCodeEditor

auto save

parent 9b745737
Showing with 20 additions and 15 deletions
...@@ -2,27 +2,31 @@ username = "Jzh" # 保存在服务器数据库中的用户账号(正确的 ...@@ -2,27 +2,31 @@ username = "Jzh" # 保存在服务器数据库中的用户账号(正确的
userpassword = "1314520" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "1314520" # 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
s = 1
while True:
if s>0:
sb=input("请输入用户名:")
sb=input("请输入用户名:") sp=input("请输入密码:")
sp=input("请输入密码:") if sb=="Jzh" and sp=="1314520":
if sb=="Jzh" and sp=="1314520": print("登录成功")
break
if sb!="Jzh" and sp=="1314520":
print("登录成功") print("用户名错误")
continue
s=s-1
if sb=="Jzh" and sp!="1314520":
if sb!="Jzh" and sp=="1314520": print("密码错误")
continue
print("用户名错误") s=s-1
else:
if sb=="Jzh" and sp!="1314520":
print("密码错误")
else:
print("登录失败")
print("登录失败")
break
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功
\ 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