Commit adf44998 by BellCodeEditor

save project

parent 2948e02a
Showing with 8 additions and 2 deletions
i=3
username = "aaa" # 保存在服务器数据库中的用户账号(正确的账号) username = "aaa" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "159753" userpassword = "159753"
while True: # 保存在服务器数据库中的用户密码(正确的密码) while True:
if i>0 # 保存在服务器数据库中的用户密码(正确的密码)
name=input("请输入帐号:") name=input("请输入帐号:")
password=input("请输入密码:") password=input("请输入密码:")
i-=1
if name == username and password == userpassword: if name == username and password == userpassword:
print("登录成功!") print("登录成功!")
break break
...@@ -10,7 +13,10 @@ while True: # 保存在服务器数据库中的用户密码(正确的密码 ...@@ -10,7 +13,10 @@ while True: # 保存在服务器数据库中的用户密码(正确的密码
print("帐号错了!!!!!!") print("帐号错了!!!!!!")
continue continue
if password != userpassword: if password != userpassword:
print("密码错了!!!!!!!!") print("密码错了!!!!!!!!")
else:
print("您的帐户被锁定")
exit()
print("欢迎来到贝尔编程") print("欢迎来到贝尔编程")
......
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