Commit 56dbe018 by BellCodeEditor

save project

parent 7018f796
Showing with 20 additions and 14 deletions
username = "python" username = "python"
userpassword = "123456" userpassword = "123456"
i=3
while True:
print("欢迎来到贝尔编程!") while True: if i>0:
name = input("请输入用户名:") name = input("请输入用户名:")
password = input("请输入密码:") password = input("请输入密码:")
if name!=username: if name!=username:
print("输入的账号有误!") print("输入的账号不存在,请重新输入!")
continue i-=1
if password!=userpassword: continue
print("输入的密码有误!") if password!=userpassword:
if name == username and password == userpassword: print("输入的密码有误!")
print("登录成功!") i-=1
break if name == username and password == userpassword:
\ No newline at end of file print("登录成功!")
break
else:
print("已锁定!")
exit()
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