Commit 2fb38505 by BellCodeEditor

save project

parent da3d106f
Showing with 3 additions and 1 deletions
...@@ -3,7 +3,7 @@ p="123456" ...@@ -3,7 +3,7 @@ p="123456"
#w=input("你的名字是什么") #w=input("你的名字是什么")
#i=input('你的密码是什么?') #i=input('你的密码是什么?')
m=1 m=1
def u (): def u():
while True: while True:
w=input("你的名字是什么") w=input("你的名字是什么")
i=input('你的密码是什么?') i=input('你的密码是什么?')
...@@ -16,6 +16,7 @@ def u (): ...@@ -16,6 +16,7 @@ def u ():
print('密码输入错误,请重新输入') print('密码输入错误,请重新输入')
#print("用户名或密码输入错误,请重新输入") #print("用户名或密码输入错误,请重新输入")
m=m+1 m=m+1
print("你还有+str(i)+次机会")
if m>3: if m>3:
print('连续三次输入错误。拒绝登录') print('连续三次输入错误。拒绝登录')
break break
...@@ -23,6 +24,7 @@ def u (): ...@@ -23,6 +24,7 @@ def u ():
print("欢迎来到编程器") print("欢迎来到编程器")
else: else:
print("去警察局") print("去警察局")
print(u) print(u)
......
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