Commit 2e20a248 by BellCodeEditor

save project

parent 8b945412
Showing with 4 additions and 3 deletions
...@@ -3,13 +3,14 @@ userpassword = "123456" ...@@ -3,13 +3,14 @@ userpassword = "123456"
while True: # 保存在服务器数据库中的用户密码(正确的密码) while True: # 保存在服务器数据库中的用户密码(正确的密码)
mame=input("请输入账号:") mame=input("请输入账号:")
password=input("请输入密码:") password=input("请输入密码:")
if password==userpassword and mame==username: if mame==username and password==userpassword:
print("登录成功") print("登录成功")
break break
if mame!=username:
print("用户账号错误,请重新输入!")
continue
if password!=userpassword: if password!=userpassword:
print("用户密码错误,请重新输入!") print("用户密码错误,请重新输入!")
if mame==username:
print("用户账号错误,请重新输入!")
print("欢迎来到贝尔编程") print("欢迎来到贝尔编程")
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
......
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