Commit 11cfe813 by BellCodeEditor

save project

parent b6085593
Showing with 8 additions and 4 deletions
i=3 i=3
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "QQ" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码): userpassword = "666" # 保存在服务器数据库中的用户密码(正确的密码):
while True: while True:
if i>0: if i>0:
name=input("请输入您的帐号")# 请用input()实现用户输入账号、密码的功能 name=input("请输入您的帐号")# 请用input()实现用户输入账号、密码的功能
...@@ -11,8 +11,11 @@ while True: ...@@ -11,8 +11,11 @@ while True:
print("登入成功") print("登入成功")
break break
if name != username: if name != username:
print("账号错误请重新输入") print("账号错误请重新输入"+"你还有"+str(i)+"次机会")
continue continue
if password != userpassword: if password != userpassword:
print("密码错误请重新输入") print("密码错误请重新输入"+"你还有"+str(i)+"次机会")
else:
print("滚!你个黑客")
exit()
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