Commit a803da24 by BellCodeEditor

save project

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