Commit 1a5982c8 by BellCodeEditor

save project

parent d419e884
Showing with 9 additions and 1 deletions
username = "python"
userpasswd="123456"
c=3
while True:
if c==0:
print('恭喜你机会用完,账户锁定')
exit()
print('还剩'+str(c)+'次机会')
name=input('请输入用户名')
password=input('请输入密码')
if name!=username:
print('用户名错误,请重新输入!')
continue
c=c-1
continue
elif password!=userpassword:
print('密码错误,请重新输入!')
c=c-1
continue
else:
break
c=c-1
print('登录成功')
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