Commit 5811a2d7 by BellCodeEditor

save project

parent 21504d7b
Showing with 8 additions and 6 deletions
i=3 i=3
x=3
username = "666" username = "666"
userpassword = "123456" userpassword = "123456"
while True: while True:
if i>0: if i>0 and x>0:
name = input("请输入用户名") name = input("请输入用户名")
password = input("请输入密码") password = input("请输入密码")
i -= 1 i -= 1
x -= 1
if name == username and password == userpassword: if name == username and password == userpassword:
print("登录成功") print("登录成功")
break break
if name != username: elif name != username:
print("用户名错误") print("用户名错误")
continue else :
if password != userpassword:
print("密码错误") print("密码错误")
continue print("还剩2次")
else: else:
print("您的账号以被锁定,请查证身份") print("您的账号以被锁定,请查证身份")
break break
\ No newline at end of file
...@@ -4,7 +4,7 @@ s3={"yu":100,"shu":100,"ying":100} ...@@ -4,7 +4,7 @@ s3={"yu":100,"shu":100,"ying":100}
s={"wu":s1,"n":s2,"叶文彬":s3} s={"wu":s1,"n":s2,"叶文彬":s3}
while True: while True:
name=input("name""退出按a") name=input("name""退出按a")
sss
if name in s: if name in s:
a=s[name] a=s[name]
......
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