Commit b41cd406 by BellCodeEditor

save project

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