Commit bfcb3fde by BellCodeEditor

save project

parent acbf6999
Showing with 5 additions and 2 deletions
...@@ -3,16 +3,18 @@ username = "cy" ...@@ -3,16 +3,18 @@ username = "cy"
userpassword = "123456" userpassword = "123456"
while True: while True:
if i>0: if i>0:
name = input("记得你的名字吗?:") name = input("记得你的名字吗?")
password = input("记得你的密码吗?:") password = input("记得你的密码吗?")
i-=1 i-=1
if name == username and password == userpassword: if name == username and password == userpassword:
print("对啦!") print("对啦!")
break break
elif name!=username: elif name!=username:
print("你的名字错了") print("你的名字错了")
print("还有"+str(i)+"次哦")
elif password!=userpassword: elif password!=userpassword:
print("你的密码错了") print("你的密码错了")
print("还有"+str(i)+"次哦")
else: else:
print("你应该去找别人问问") print("你应该去找别人问问")
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