Commit c017b0f7 by BellCodeEditor

auto save

parent 798b17e9
Showing with 8 additions and 5 deletions
...@@ -3,9 +3,9 @@ i=3 ...@@ -3,9 +3,9 @@ i=3
username= "python" username= "python"
userpassword = "123456" userpassword = "123456"
#判断 #判断
name = input("你账号是?")
while True: while True:
if i==3: if i> -1:
name = input("你账号是?")
if name == username: if name == username:
password = input("你密码是?") password = input("你密码是?")
if password == userpassword: if password == userpassword:
...@@ -14,8 +14,10 @@ while True: ...@@ -14,8 +14,10 @@ while True:
if password != userpassword: if password != userpassword:
print("密码错误"+"你还有"+ str(i)+ "次机会") print("密码错误"+"你还有"+ str(i)+ "次机会")
i-= 1 i-= 1
if name != username: else :
print("账户错误") print("账户错误")
i-= 1 continue
continue else :
print("你号没了")
exit()
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