Commit 3e02e3f7 by BellCodeEditor

save project

parent c3fe5504
Showing with 7 additions and 5 deletions
...@@ -3,11 +3,13 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正 ...@@ -3,11 +3,13 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
while True: while True:
ZH=input("请输入账号:") ZH=input("请输入账号:")
MM=input("请输入密码") MM=input("请输入密码:")
if ZH==username and MM==userpassword: if ZH==username and MM==userpassword:
print("登录成功") print("登录成功")
break break
else: if ZH != username:
print("请重新输入") print("账号错误,请重新输入!")
if MM != userpassword:
print("密码错误,请重新输入")
print("欢迎来到贝尔编程") print("欢迎来到贝尔编程")
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功重
\ No newline at end of file \ 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