Commit 0a38b6ae by BellCodeEditor

save project

parent b4f212e4
Showing with 23 additions and 12 deletions
userneme = "python"
i=3
username = "python"
userpassword = "123456"
while True:
usersname=input("请输入账号:")
if usersname != username:
print("账号错误,请重新输入")
continue
userspassword=input("请输入密码:")
if usersname==username and userspassword==userpassword:
print("登陆成功")
break
while True:
if i>0:
usersname=input("请输入账号:")
if username != usersname:
print("账号错误,请重新输入")
continue
userspassword=input("请输入密码:")
if usersname==username and userspassword==userpassword:
print("登陆成功")
break
else:
print("密码错误,请重新输入")
i-=1
else:
print("密码错误,请重新输入")
print("错误次数已超出,已冻结。")
exit()
print("欢迎来到贝尔编程!")
\ No newline at end of file
userneme="python"
userpassword="123456"
while True:
......@@ -10,6 +11,9 @@ while True:
userspassword=input("请输入密码:")
if userspassword != userpassword:
print("密码错误,请重新输入")
i-=1
else:
else:
break
print("登陆成功,欢迎来到python世界!")
\ 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