Commit ea3fffe2 by BellCodeEditor

save project

parent f2be331c
Showing with 6 additions and 2 deletions
......@@ -2,9 +2,12 @@ username = "python" # 保存在服务器数据库中的用户账号(正确
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能
i=3
while True:
if i>0:
name = input("请输入用户名:")
password = input("请输入密码:")
i-=1
if name == username and password == userpassword:
print("你已成功登录!")
break
......@@ -13,5 +16,7 @@ while True:
continue
if password != userpassword:
print("你输入的密码错误请重新输入!")
else:
print("你的账号已锁定,请来我司解锁!")
exit()
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