Commit fd15549b by BellCodeEditor

save project

parent eba421e4
Showing with 7 additions and 2 deletions
i=5
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
while True: while True:
if i>0:
c = input("请输入用户名称") c = input("请输入用户名称")
d = input("请输入密码") d = input("请输入密码")
i-=1
if c !=username: if c !=username:
print("用户名错误,请从新输入") print("用户名错误,请从新输入")
continue continue
...@@ -12,4 +15,7 @@ while True: ...@@ -12,4 +15,7 @@ while True:
if c==username and d==userpassword: if c==username and d==userpassword:
print("登陆成功") print("登陆成功")
break break
print("欢迎来到贝儿编程") print("欢迎来到贝编程")
\ No newline at end of file else:
print("用户账号已被封锁")
break
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