Commit 47ead666 by BellCodeEditor

save project

parent f092f71e
Showing with 8 additions and 5 deletions
...@@ -3,10 +3,12 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正 ...@@ -3,10 +3,12 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
while True: while True:
a=input('输入账号:') while True:
if a != username: a=input('输入账号:')
print('账号错误') if a != username:
continue print('账号错误')
if a==username:
break
b=input('输入密码:') b=input('输入密码:')
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功
...@@ -16,5 +18,5 @@ while True: ...@@ -16,5 +18,5 @@ while True:
if b != userpassword: if b != userpassword:
print('密码错误') print('密码错误')
continue
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