Commit 5aea7d55 by BellCodeEditor

save project

parent 04fe3746
Showing with 7 additions and 4 deletions
...@@ -3,11 +3,13 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正 ...@@ -3,11 +3,13 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正
while True: while True:
c = input("请输入用户名称") c = input("请输入用户名称")
d = input("请输入密码") d = input("请输入密码")
if c==username and d==userpassword:
print("登陆成功")
break
if c !=username: if c !=username:
print("用户名错误,请从新输入") print("用户名错误,请从新输入")
continue
if d !=userpassword: if d !=userpassword:
print("密码错误,请从新输入") print("密码错误,请从新输入")
continue
if c==username and d==userpassword:
print("登陆成功")
break
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