Commit ed9d6665 by BellCodeEditor

save project

parent 0640721c
Showing with 8 additions and 2 deletions
a = "python" # 保存在服务器数据库中的用户账号(正确的账号) a = "1" # 保存在服务器数据库中的用户账号(正确的账号)
b = "123456" # 保存在服务器数据库中的用户密码(正确的密码) b = "2" # 保存在服务器数据库中的用户密码(正确的密码)
i=3
while True: while True:
c = input("请输入名字") c = input("请输入名字")
d = input("请输入密码") d = input("请输入密码")
...@@ -7,10 +8,15 @@ while True: ...@@ -7,10 +8,15 @@ while True:
print("登入成功") print("登入成功")
break break
print("登陆失败") print("登陆失败")
print("还剩下"+str(i)+"次机会")
i=i-1
if a!=c: if a!=c:
print("名字错误") print("名字错误")
if b!=d: if b!=d:
print("密码错误") print("密码错误")
if i==0 :
print("登录次数已用完")
exit()
print("欢迎来到贝尔编程") print("欢迎来到贝尔编程")
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
......
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