Commit b41cd406 by BellCodeEditor

save project

parent 275b2c21
Showing with 15 additions and 13 deletions
...@@ -6,19 +6,21 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正 ...@@ -6,19 +6,21 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功
while True: while True:
e=input("输入账号") if i > 0:
d=input("输入密码") e=input("输入账号")
if username==e and userpassword==d: d=input("输入密码")
print("输入成功") i-=1
break if username==e and userpassword==d:
if username==e: print("输入成功")
print("账号输入错误") break
continue if username==e:
i=i-1 print("账号输入错误")
if userpassword!=d: print("还剩",str(i),"次")
print("密码输入错误") continue
i=i-1 if userpassword!=d:
if i==0: print("密码输入错误")
print("还剩",str(i),"次")
else:
print("次数用完") print("次数用完")
exit() 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