Commit 18500786 by BellCodeEditor

save project

parent c8898586
Showing with 7 additions and 4 deletions
username = "python" username = "python"
userpassword = "123456" userpassword = "123456"
i=0 i=3
while i<3: while i<3:
i=i+1 i=i-1
left=3-i left=3-i
left=str(left) left=str(left)
name = input("请输入用户名:") name = input("请输入用户名:")
...@@ -17,4 +17,7 @@ while i<3: ...@@ -17,4 +17,7 @@ while i<3:
if password!=userpassword: if password!=userpassword:
print("密码输入有误,请重新输入!") print("密码输入有误,请重新输入!")
print("还有"+left+"次机会) print("还有"+left+"次机会)
print("欢迎来到贝尔编程!") if i>0:
\ No newline at end of file print("欢迎来到贝尔编程!")
else:
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