Commit 49fc0fb4 by BellCodeEditor

save project

parent 69353344
Showing with 7 additions and 1 deletions
username = "python" username = "python"
userpassword = "123456" userpassword = "123456"
i=0 i=0
while i<5: a=5
while i<5 and a>0:
i=i+1 i=i+1
left=5-i
left=str(left)
name = input("请输入用户名:") name = input("请输入用户名:")
password = input("请输入密码:") password = input("请输入密码:")
if name == username and password == userpassword: if name == username and password == userpassword:
...@@ -10,7 +13,9 @@ while i<5: ...@@ -10,7 +13,9 @@ while i<5:
break break
if name!=username: if name!=username:
print("请重新输入账号!") print("请重新输入账号!")
print("您还剩"+left+"次")
continue continue
if password!=userpassword: if password!=userpassword:
print("请重新输入密码!") print("请重新输入密码!")
print("您还剩"+left+"次")
print("欢迎") print("欢迎")
\ No newline at end of file
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