Commit 5d20a15c by BellCodeEditor

save project

parent 760af245
Showing with 9 additions and 7 deletions
......@@ -2,18 +2,20 @@ i = 3
username = "python"
userpassword = "123456"
while True:
if i=0:
name =("请输入用户名:")
if i>0:
name = input("请输入用户名:")
password = input("请输入密码:")
i=-1
i-=1
if name == username and password == userpassword:
break
print("登录成功!")
if username != name:
print("账号不匹配")
if username != password
continue
print("密码不匹配")
print("账号不匹配")
print("还有" +str(i)+"次机会")
continue
if userpassword != password:
print("密码不匹配")
print("还有" +str(i)+"次机会")
else:
print("机会用完了")
exit()
......
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